spec/shellshot_spec.rb in shellshot-0.4.1 vs spec/shellshot_spec.rb in shellshot-0.4.2
- old
+ new
@@ -22,10 +22,10 @@
Shellshot.exec(%q[ruby -e '$stderr << "Hello "; puts "World"'], :stdall => "file")
"file".should contain("Hello World")
end
it "should cancel execution on time if timeout provided" do
- lambda { Shellshot.exec %q[ruby -e 'sleep 10000'], :timeout => 1 }.should raise_error(Timeout::Error)
+ lambda { Shellshot.exec %q[ruby -e 'sleep 10000'], :timeout => 1 }.should raise_error(Timeout::Error, "execution of ruby -e 'sleep 10000' exceeded 1 seconds")
end
it "should raise error if command returned something else." do
lambda { Shellshot.exec %q[ruby -e '$stderr << "problem"; exit 1;'] }.should raise_error(Shellshot::CommandError, "problem")
end