summaryrefslogtreecommitdiff
path: root/features/steps/fixture_steps.rb
diff options
context:
space:
mode:
authorNuo Yan <nuo@opscode.com>2011-04-05 14:46:30 -0700
committerNuo Yan <nuo@opscode.com>2011-04-05 18:42:47 -0700
commit95cccfba863a0191bf2f29483ee9cd1e525ef52b (patch)
tree97f35a5334278a67509a70655a9d9ac109b7efc7 /features/steps/fixture_steps.rb
parent9e562efb6d8319899615bfda6b08b608a5bb8018 (diff)
downloadchef-95cccfba863a0191bf2f29483ee9cd1e525ef52b.tar.gz
CHEF-2183 Default and Override Attributes for Environments
Diffstat (limited to 'features/steps/fixture_steps.rb')
-rw-r--r--features/steps/fixture_steps.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/features/steps/fixture_steps.rb b/features/steps/fixture_steps.rb
index 353cff2f5a..b3ef44f85c 100644
--- a/features/steps/fixture_steps.rb
+++ b/features/steps/fixture_steps.rb
@@ -270,11 +270,19 @@ Before do
'name only' => { :name => 'test_cookbook' }
},
'environment' => {
+ 'default_attr_test' => Proc.new do
+ e = Chef::Environment.new
+ e.name 'default_attr_test'
+ e.description 'Test default attrs for environments'
+ e.default_attributes({"attribute_priority_was" => "came from environment default_attr_test default attributes"})
+ e
+ end,
'cucumber' => Proc.new do
e = Chef::Environment.new
e.name 'cucumber'
e.description 'I like to run tests'
- e.attributes({"attribute_priority_was" => "came from environment cucumber"})
+ e.default_attributes({"attribute_priority_was" => "came from environment cucumber default attributes"})
+ e.override_attributes({"attribute_priority_was" => "came from environment cucumber override attributes"})
e
end,
'production' => Proc.new do