summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorIvan Larionov <ivan.larionov@skype.net>2014-10-19 01:20:45 +0400
committerIvan Larionov <ivan.larionov@skype.net>2014-10-19 01:20:45 +0400
commitdd3a00dcb983f895038c86c0dd638638e0f7e56e (patch)
tree8a57392b02aef0590540b5382dcf216399421e0f /spec/unit
parent84447d69f1c963e6579f9716878bff8de3aac396 (diff)
downloadchef-dd3a00dcb983f895038c86c0dd638638e0f7e56e.tar.gz
Separate test for node.to_hash with empty run_list.
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/node_spec.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/unit/node_spec.rb b/spec/unit/node_spec.rb
index 9c5389393d..da7a67aec1 100644
--- a/spec/unit/node_spec.rb
+++ b/spec/unit/node_spec.rb
@@ -682,9 +682,6 @@ describe Chef::Node do
describe "to_hash" do
it "should serialize itself as a hash" do
- # Empty run_list should return an empty array
- node.to_hash["run_list"].should == []
-
node.chef_environment("dev")
node.default_attrs = { "one" => { "two" => "three", "four" => "five", "eight" => "nine" } }
node.override_attrs = { "one" => { "two" => "three", "four" => "six" } }
@@ -703,6 +700,10 @@ describe Chef::Node do
h["run_list"].should be_include("recipe[stalinist]")
h["chef_environment"].should == "dev"
end
+
+ it 'should return an empty array for empty run_list' do
+ node.to_hash["run_list"].should == []
+ end
end
describe "converting to or from json" do