diff options
author | danielsdeleo <dan@opscode.com> | 2012-10-19 15:35:25 -0700 |
---|---|---|
committer | danielsdeleo <dan@opscode.com> | 2012-10-19 15:35:25 -0700 |
commit | 3fe49d7751a0194790b887708b28ca31d7046053 (patch) | |
tree | bc594753736164e616ec0c1c587bde42b6893627 | |
parent | 0e6d00b9453bc9efe98876490c000fcf0aed7fec (diff) | |
download | chef-3fe49d7751a0194790b887708b28ca31d7046053.tar.gz |
[CHEF-2992] add a test that auto-loaded attr files get marked as seen
-rw-r--r-- | chef/spec/unit/run_context_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chef/spec/unit/run_context_spec.rb b/chef/spec/unit/run_context_spec.rb index 7b52cefd6d..51fa0e81f9 100644 --- a/chef/spec/unit/run_context_spec.rb +++ b/chef/spec/unit/run_context_spec.rb @@ -65,6 +65,14 @@ describe Chef::RunContext do @run_context.loaded_fully_qualified_attribute?("test", "george").should be_true @node[:george].should == "washington" end + + it "registers attributes files as loaded so they won't be reloaded" do + # This test unfortunately is pretty tightly intertwined with the + # implementation of how nodes load attribute files, but is the only + # convenient way to test this behavior. + @node.should_not_receive(:from_file) + @node.include_attribute("test::george") + end end end |