diff options
| author | Jesse Wolfe <jes5199@gmail.com> | 2010-11-01 11:40:48 -0700 |
|---|---|---|
| committer | Jesse Wolfe <jes5199@gmail.com> | 2010-11-01 11:48:50 -0700 |
| commit | 5f0cf4ef50a3676229a1c824b9a730b6951e1c7a (patch) | |
| tree | 1c3518eabbea255b21d8b68682626fb116b60d0d | |
| parent | 90af9201aefdbd7647827ba772e4564ee05aa6ad (diff) | |
Maint: Don't use a stub for a Facts object in the compiler specs
The catalog compiler spec was overstubbing the Node::Facts object,
making it hard to test the interaction between those two systems.
| -rwxr-xr-x | spec/unit/indirector/catalog/compiler_spec.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/unit/indirector/catalog/compiler_spec.rb b/spec/unit/indirector/catalog/compiler_spec.rb index 5cbb62985..a9c2e3e28 100755 --- a/spec/unit/indirector/catalog/compiler_spec.rb +++ b/spec/unit/indirector/catalog/compiler_spec.rb @@ -156,7 +156,8 @@ describe Puppet::Resource::Catalog::Compiler do @compiler = Puppet::Resource::Catalog::Compiler.new @request = stub 'request', :options => {} - @facts = stub 'facts', :save => nil + @facts = Puppet::Node::Facts.new('hostname', "fact" => "value", "architecture" => "i386") + @facts.stubs(:save).returns(nil) end it "should do nothing if no facts are provided" do |
