Sha256: d31349aa3f3b443cb53aa46469b2c443cdff237c599fc17fab17ccf952613e1e
Contents?: true
Size: 1.14 KB
Versions: 4
Compression:
Stored size: 1.14 KB
Contents
require 'spec_helper' require 'albacore/exec' describe Exec, "when executing a command with parameters" do before :all do @nunit = File.join(File.dirname(__FILE__), 'support', 'Tools', 'NUnit-v2.5', 'nunit-console-x86.exe') @cmd = Exec.new @cmd.log_level = :verbose @cmd.extend(SystemPatch) @cmd.extend(FailPatch) @cmd.command = @nunit @cmd.parameters "--help" @cmd.execute end it "should run the command with the parameters" do @cmd.system_command.should include("\"#{File.expand_path(@nunit)}\" --help") end it "should specify the parameters only once" do @cmd.system_command.scan(/--help/).length.should be(1) end it "should not fail" do $task_failed.should be_false end end describe Exec, "when providing configuration" do let :exec do Albacore.configure do |config| config.exec do |exe| exe.command = "foo.exe" exe.parameters = ["bar", "baz"] end end exec = Exec.new end it "should use the configuration" do exec.command.should == "foo.exe" exec.parameters.should == ["bar", "baz"] end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
albacore-0.2.5 | spec/exec_spec.rb |
albacore-0.2.4 | spec/exec_spec.rb |
albacore-0.2.3 | spec/exec_spec.rb |
albacore-0.2.2 | spec/exec_spec.rb |