allow overriding Command builder short description with CMD_DESC variable -- close #22
This commit is contained in:
1 parent
897d31ebe0
commit
02aff35222
3 files changed
+10
-5
No files matched your search
@@ -1,16 +1,18 @@
|
||||
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})
|
||||
expect(subject).to receive(:standard_build).with("PANDOC foo.html", "foo.html", expected_cmd, ["foo.md"], env, :cache)
|
||||
subject.run("foo.html", ["foo.md"], :cache, env,
|
||||
"CMD" => command, "CMD_DESC" => "PANDOC")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user