From 5e5ee97ae4cdedbb7975a44fd8a7a4cd4fb86606 Mon Sep 17 00:00:00 2001 From: Jesse Wolfe Date: Fri, 10 Dec 2010 13:58:55 -0800 Subject: maint: Fully stub partially stubbed test. This test was succeeding in versions of Mocha before 0.9.10, because the Mocha expectation exceptions were being incorrectly interpreted as if they were File Not Found exceptions. --- spec/unit/provider/service/init_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/unit/provider/service/init_spec.rb b/spec/unit/provider/service/init_spec.rb index bbc88ff76..856821985 100755 --- a/spec/unit/provider/service/init_spec.rb +++ b/spec/unit/provider/service/init_spec.rb @@ -84,10 +84,12 @@ describe provider_class do end it "should be able to find the init script in the service path" do + File.stubs(:stat).raises(Errno::ENOENT.new('No such file or directory')) File.expects(:stat).with("/service/path/myservice").returns true @provider.initscript.should == "/service/path/myservice" end it "should be able to find the init script in the service path" do + File.stubs(:stat).raises(Errno::ENOENT.new('No such file or directory')) File.expects(:stat).with("/alt/service/path/myservice").returns true @provider.initscript.should == "/alt/service/path/myservice" end -- cgit