diff options
| author | Luke Kanies <luke@madstop.com> | 2008-10-16 16:17:30 -0500 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2008-10-17 08:22:59 +1100 |
| commit | a74ec60d33dee1c592ec858faeccc23d7a7b79f3 (patch) | |
| tree | 24bbe35f647f2622b42397a52cc66177c59597b8 /spec | |
| parent | d4df36126fa62406c2cbb7a55b18234032da156b (diff) | |
| download | puppet-a74ec60d33dee1c592ec858faeccc23d7a7b79f3.tar.gz puppet-a74ec60d33dee1c592ec858faeccc23d7a7b79f3.tar.xz puppet-a74ec60d33dee1c592ec858faeccc23d7a7b79f3.zip | |
Fixing tests I broke when trying to fix the Providers reference.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec')
| -rwxr-xr-x | spec/unit/provider/confine/variable.rb | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/spec/unit/provider/confine/variable.rb b/spec/unit/provider/confine/variable.rb index 093301bdc..38b3dad1c 100755 --- a/spec/unit/provider/confine/variable.rb +++ b/spec/unit/provider/confine/variable.rb @@ -85,16 +85,26 @@ describe Puppet::Provider::Confine::Variable do describe "when summarizing multiple instances" do it "should return a hash of failing variables and their values" do - c1 = stub '1', :valid? => false, :values => %w{one}, :fact => "uno" - c2 = stub '2', :valid? => true, :values => %w{two}, :fact => "dos" - c3 = stub '3', :valid? => false, :values => %w{three}, :fact => "tres" + c1 = Puppet::Provider::Confine::Variable.new("one") + c1.name = "uno" + c1.expects(:valid?).returns false + c2 = Puppet::Provider::Confine::Variable.new("two") + c2.name = "dos" + c2.expects(:valid?).returns true + c3 = Puppet::Provider::Confine::Variable.new("three") + c3.name = "tres" + c3.expects(:valid?).returns false Puppet::Provider::Confine::Variable.summarize([c1, c2, c3]).should == {"uno" => %w{one}, "tres" => %w{three}} end it "should combine the values of multiple confines with the same fact" do - c1 = stub '1', :valid? => false, :values => %w{one}, :fact => "uno" - c2 = stub '2', :valid? => false, :values => %w{two}, :fact => "uno" + c1 = Puppet::Provider::Confine::Variable.new("one") + c1.name = "uno" + c1.expects(:valid?).returns false + c2 = Puppet::Provider::Confine::Variable.new("two") + c2.name = "uno" + c2.expects(:valid?).returns false Puppet::Provider::Confine::Variable.summarize([c1, c2]).should == {"uno" => %w{one two}} end |
