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.
Signed-off-by: Jesse Wolfe <[email protected]> --- spec/unit/provider/service/init_spec.rb | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/spec/unit/provider/service/init_spec.rb b/spec/unit/provider/service/init_spec.rb index bbc88ff..8568219 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 -- 1.7.0.4 -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
