Added a command builder to the list of default builders

This commit is contained in:
Michael D. Lowis committed 2014-10-13 12:27:05 -04:00
1 parent 469f575564
commit e279959d79
4 files changed
+61

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
module Rscons
module Builders
describe Command do
let(:command) { ['pandoc', '-fmarkdown', '-thtml', '-o${_TARGET}', '${_SOURCES}'] }
let(:env) {Environment.new}
subject {Command.new}
it "invokes the command to build the target" do
expected_cmd = ['pandoc', '-fmarkdown', '-thtml', '-ofoo.html', 'foo.md']
expect(subject).to receive(:standard_build).with("CMD foo.html", "foo.html", expected_cmd, ["foo.md"], env, :cache)
subject.run("foo.html", ["foo.md"], :cache, env, {'CMD' => command})
end
end
end
end