spec/aruba/process_spec.rb in aruba-0.5.0 vs spec/aruba/process_spec.rb in aruba-0.5.1

- old
+ new

@@ -1,11 +1,11 @@ require 'aruba/process' module Aruba describe Process do - let(:process) { Process.new('echo "yo"', 0, 0.1) } + let(:process) { Process.new('echo "yo"', 0.1, 0.1) } describe "#stdout" do before { process.run! } it "returns the stdout" do @@ -24,9 +24,19 @@ it "sends any output to the reader" do reader = stub.as_null_object reader.should_receive(:stdout).with("yo\n") process.stop(reader, false) + end + end + + describe "#run!" do + context "upon process launch error" do + let(:process_failure) { Process.new('does_not_exists', 1, 1) } + + it "raises a Aruba::LaunchError" do + lambda{process_failure.run!}.should raise_error(::Aruba::LaunchError) + end end end end end