diff options
Diffstat (limited to 'spec/unit')
-rwxr-xr-x | spec/unit/provider/confine/exists.rb | 1 | ||||
-rwxr-xr-x | spec/unit/provider/confine/false.rb | 1 | ||||
-rwxr-xr-x | spec/unit/provider/confine/feature.rb | 1 | ||||
-rwxr-xr-x | spec/unit/provider/confine/true.rb | 5 | ||||
-rwxr-xr-x | spec/unit/provider/confine/variable.rb | 1 |
5 files changed, 8 insertions, 1 deletions
diff --git a/spec/unit/provider/confine/exists.rb b/spec/unit/provider/confine/exists.rb index 1ab1d39f7..a3539c4f5 100755 --- a/spec/unit/provider/confine/exists.rb +++ b/spec/unit/provider/confine/exists.rb @@ -7,6 +7,7 @@ require 'puppet/provider/confine/exists' describe Puppet::Provider::Confine::Exists do before do @confine = Puppet::Provider::Confine::Exists.new("/my/file") + @confine.label = "eh" end it "should be named :exists" do diff --git a/spec/unit/provider/confine/false.rb b/spec/unit/provider/confine/false.rb index c6c43e391..6ff5cc133 100755 --- a/spec/unit/provider/confine/false.rb +++ b/spec/unit/provider/confine/false.rb @@ -18,6 +18,7 @@ describe Puppet::Provider::Confine::False do it "should use the 'pass?' method to test validity" do @confine = Puppet::Provider::Confine::False.new("foo") + @confine.label = "eh" @confine.expects(:pass?).with("foo") @confine.valid? end diff --git a/spec/unit/provider/confine/feature.rb b/spec/unit/provider/confine/feature.rb index 1845c9a47..67e59363e 100755 --- a/spec/unit/provider/confine/feature.rb +++ b/spec/unit/provider/confine/feature.rb @@ -22,6 +22,7 @@ describe Puppet::Provider::Confine::Feature do @features = mock 'features' Puppet.stubs(:features).returns @features @confine = Puppet::Provider::Confine::Feature.new("myfeature") + @confine.label = "eh" end it "should use the Puppet features instance to test validity" do diff --git a/spec/unit/provider/confine/true.rb b/spec/unit/provider/confine/true.rb index c9cc83c9e..75b36cea5 100755 --- a/spec/unit/provider/confine/true.rb +++ b/spec/unit/provider/confine/true.rb @@ -14,7 +14,10 @@ describe Puppet::Provider::Confine::True do end describe "when testing values" do - before { @confine = Puppet::Provider::Confine::True.new("foo") } + before do + @confine = Puppet::Provider::Confine::True.new("foo") + @confine.label = "eh" + end it "should use the 'pass?' method to test validity" do @confine.expects(:pass?).with("foo") diff --git a/spec/unit/provider/confine/variable.rb b/spec/unit/provider/confine/variable.rb index 5f4c6c7a2..7a71fc1ae 100755 --- a/spec/unit/provider/confine/variable.rb +++ b/spec/unit/provider/confine/variable.rb @@ -65,6 +65,7 @@ describe Puppet::Provider::Confine::Variable do it "should produce a message that the fact value is not correct" do @confine = Puppet::Provider::Confine::Variable.new(%w{bar bee}) + @confine.name = "eh" message = @confine.message("value") message.should be_include("facter") message.should be_include("bar,bee") |