summaryrefslogtreecommitdiffstats
path: root/spec/unit/provider
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2010-12-10 13:58:55 -0800
committerJesse Wolfe <jes5199@gmail.com>2010-12-10 14:33:40 -0800
commit5e5ee97ae4cdedbb7975a44fd8a7a4cd4fb86606 (patch)
tree47deaa2a43c759ec42e8508152792e9b7136505a /spec/unit/provider
parent3d7c8d091d713eee88a4871da52a72fcc9eb98ee (diff)
downloadpuppet-5e5ee97ae4cdedbb7975a44fd8a7a4cd4fb86606.tar.gz
puppet-5e5ee97ae4cdedbb7975a44fd8a7a4cd4fb86606.tar.xz
puppet-5e5ee97ae4cdedbb7975a44fd8a7a4cd4fb86606.zip
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.
Diffstat (limited to 'spec/unit/provider')
-rwxr-xr-xspec/unit/provider/service/init_spec.rb2
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 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