summaryrefslogtreecommitdiffstats
path: root/spec/unit/provider/service/debian_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/provider/service/debian_spec.rb')
-rwxr-xr-xspec/unit/provider/service/debian_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/unit/provider/service/debian_spec.rb b/spec/unit/provider/service/debian_spec.rb
index ea87c375d..08cf50c27 100755
--- a/spec/unit/provider/service/debian_spec.rb
+++ b/spec/unit/provider/service/debian_spec.rb
@@ -57,25 +57,25 @@ describe provider_class do
@provider.disable
end
end
-
+
describe "when checking whether it is enabled" do
it "should call Kernel.system() with the appropriate parameters" do
@provider.expects(:system).with("/usr/sbin/invoke-rc.d", "--quiet", "--query", @resource[:name], "start").once
@provider.enabled?
end
-
+
it "should return true when invoke-rc.d exits with 104 status" do
@provider.stubs(:system)
$?.stubs(:exitstatus).returns(104)
@provider.enabled?.should == :true
end
-
+
it "should return true when invoke-rc.d exits with 106 status" do
@provider.stubs(:system)
$?.stubs(:exitstatus).returns(106)
@provider.enabled?.should == :true
end
-
+
# pick a range of non-[104.106] numbers, strings and booleans to test with.
[-100, -1, 0, 1, 100, "foo", "", :true, :false].each do |exitstatus|
it "should return false when invoke-rc.d exits with #{exitstatus} status" do
@@ -86,4 +86,4 @@ describe provider_class do
end
end
- end
+end