summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2010-06-25 14:04:13 -0700
committerJesse Wolfe <jes5199@gmail.com>2010-06-25 18:14:58 -0700
commite5478d4ff0510e637ecec69f8b2fc7ef844ba5c0 (patch)
tree804e74f94879f0235bda032a548bccd4c6d40618 /spec
parent4ef40b88f246a6c158cc3ea91ea44dc941d4ac41 (diff)
Simplify the newattr method by removing a level violation
and update the specs that were testing it.
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/type/service_spec.rb8
1 files changed, 0 insertions, 8 deletions
diff --git a/spec/unit/type/service_spec.rb b/spec/unit/type/service_spec.rb
index f09ed98b9..48d87ba61 100755
--- a/spec/unit/type/service_spec.rb
+++ b/spec/unit/type/service_spec.rb
@@ -76,18 +76,10 @@ describe Puppet::Type.type(:service), "when validating attribute values" do
it "should allow setting the :enable parameter if the provider has the :enableable feature" do
Puppet::Type.type(:service).defaultprovider.stubs(:supports_parameter?).returns(true)
- Puppet::Type.type(:service).defaultprovider.expects(:supports_parameter?).with(Puppet::Type.type(:service).attrclass(:enable)).returns(true)
svc = Puppet::Type.type(:service).new(:name => "yay", :enable => true)
svc.should(:enable).should == :true
end
- it "should not allow setting the :enable parameter if the provider is missing the :enableable feature" do
- Puppet::Type.type(:service).defaultprovider.stubs(:supports_parameter?).returns(true)
- Puppet::Type.type(:service).defaultprovider.expects(:supports_parameter?).with(Puppet::Type.type(:service).attrclass(:enable)).returns(false)
- svc = Puppet::Type.type(:service).new(:name => "yay", :enable => true)
- svc.should(:enable).should be_nil
- end
-
it "should split paths on ':'" do
FileTest.stubs(:exist?).returns(true)
FileTest.stubs(:directory?).returns(true)