Fail with an error on Ruby 1.8 when posix-spawn is not present.

This commit is contained in:
Klaas Jan Wierenga
2013-05-03 21:44:57 +02:00
parent ffc73366b2
commit e245026f65
2 changed files with 17 additions and 0 deletions
+8
View File
@@ -100,4 +100,12 @@ describe "Foreman::CLI", :fakefs do
end
end
describe "when posix-spawn is not present on ruby 1.8" do
it "should fail with an error" do
mock(Kernel).require('posix/spawn') { raise LoadError }
output = foreman("start -f #{resource_path("Procfile")}")
output.should == "ERROR: foreman requires gem `posix-spawn` on Ruby #{RUBY_VERSION}. Please `gem install posix-spawn`.\n"
end
end if running_ruby_18?
end