summaryrefslogtreecommitdiff
path: root/spec/unit/node/attribute_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/node/attribute_spec.rb')
-rw-r--r--spec/unit/node/attribute_spec.rb92
1 files changed, 46 insertions, 46 deletions
diff --git a/spec/unit/node/attribute_spec.rb b/spec/unit/node/attribute_spec.rb
index 250b8c630c..9956ef1ec9 100644
--- a/spec/unit/node/attribute_spec.rb
+++ b/spec/unit/node/attribute_spec.rb
@@ -188,7 +188,7 @@ describe Chef::Node::Attribute do
"os_version"=>"9.7.0",
"hostname"=>"latte",
"macaddress"=>"00:23:6c:7f:67:6c",
- "music" => { "jimmy_eat_world" => "nice", "apophis" => false }
+ "music" => { "jimmy_eat_world" => "nice", "apophis" => false },
}
@default_hash = {
"domain" => "opscode.com",
@@ -198,8 +198,8 @@ describe Chef::Node::Attribute do
"mastodon" => "rocks",
"mars_volta" => "is loud and nutty",
"deeper" => { "gates_of_ishtar" => nil },
- "this" => {"apparatus" => {"must" => "be unearthed"}}
- }
+ "this" => {"apparatus" => {"must" => "be unearthed"}},
+ },
}
@override_hash = {
"macaddress" => "00:00:00:00:00:00",
@@ -207,7 +207,7 @@ describe Chef::Node::Attribute do
"fire" => "still burn",
"music" => {
"mars_volta" => "cicatriz"
- }
+ },
}
@automatic_hash = {"week" => "friday"}
@attributes = Chef::Node::Attribute.new(@attribute_hash, @default_hash, @override_hash, @automatic_hash)
@@ -272,7 +272,7 @@ describe Chef::Node::Attribute do
["role_override", "role_override"],
["env_override", "env_override"],
["force_override", "force_override"],
- ["automatic", "automatic"]
+ ["automatic", "automatic"],
]
expect(@attributes.debug_value(:foo, :bar)).to eq(expected)
end
@@ -592,17 +592,17 @@ describe Chef::Node::Attribute do
{
"one" => { "two" => "three" },
"hut" => { "two" => "three" },
- "place" => { }
+ "place" => { },
},
{
"one" => { "four" => "five" },
- "snakes" => "on a plane"
+ "snakes" => "on a plane",
},
{
"one" => { "six" => "seven" },
- "snack" => "cookies"
+ "snack" => "cookies",
},
- {}
+ {},
)
end
@@ -644,13 +644,13 @@ describe Chef::Node::Attribute do
},
{
"one" => "four",
- "snakes" => "on a plane"
+ "snakes" => "on a plane",
},
{
"one" => "six",
- "snack" => "cookies"
+ "snack" => "cookies",
},
- {}
+ {},
)
end
@@ -682,13 +682,13 @@ describe Chef::Node::Attribute do
},
{
"one" => "four",
- "snakes" => "on a plane"
+ "snakes" => "on a plane",
},
{
"one" => "six",
- "snack" => "cookies"
+ "snack" => "cookies",
},
- {}
+ {},
)
end
@@ -718,13 +718,13 @@ describe Chef::Node::Attribute do
},
{
"one" => "four",
- "snakes" => "on a plane"
+ "snakes" => "on a plane",
},
{
"one" => "six",
- "snack" => "cookies"
+ "snack" => "cookies",
},
- {}
+ {},
)
end
@@ -754,13 +754,13 @@ describe Chef::Node::Attribute do
},
{
"one" => "four",
- "snakes" => "on a plane"
+ "snakes" => "on a plane",
},
{
"one" => "six",
- "snack" => "cookies"
+ "snack" => "cookies",
},
- {}
+ {},
)
end
@@ -798,13 +798,13 @@ describe Chef::Node::Attribute do
},
{
"one" => "four",
- "snakes" => "on a plane"
+ "snakes" => "on a plane",
},
{
"one" => "six",
- "snack" => "cookies"
+ "snack" => "cookies",
},
- {}
+ {},
)
@empty = Chef::Node::Attribute.new({}, {}, {}, {})
end
@@ -832,13 +832,13 @@ describe Chef::Node::Attribute do
},
{
"one" => "four",
- "snakes" => "on a plane"
+ "snakes" => "on a plane",
},
{
"one" => "six",
- "snack" => "cookies"
+ "snack" => "cookies",
},
- {}
+ {},
)
end
@@ -852,7 +852,7 @@ describe Chef::Node::Attribute do
"one" => "six",
"hut" => "three",
"snakes" => "on a plane",
- "snack" => "cookies"
+ "snack" => "cookies",
}.each do |k,v|
expect(@attributes.fetch(k)).to eq(v)
end
@@ -889,13 +889,13 @@ describe Chef::Node::Attribute do
},
{
"one" => "four",
- "snakes" => "on a plane"
+ "snakes" => "on a plane",
},
{
"one" => "six",
- "snack" => "cookies"
+ "snack" => "cookies",
},
- {}
+ {},
)
end
@@ -934,13 +934,13 @@ describe Chef::Node::Attribute do
},
{
"one" => "four",
- "snakes" => "on a plane"
+ "snakes" => "on a plane",
},
{
"one" => "six",
- "snack" => "cookies"
+ "snack" => "cookies",
},
- {}
+ {},
)
end
@@ -975,13 +975,13 @@ describe Chef::Node::Attribute do
},
{
"one" => "four",
- "snakes" => "on a plane"
+ "snakes" => "on a plane",
},
{
"one" => "six",
- "snack" => "cookies"
+ "snack" => "cookies",
},
- {}
+ {},
)
end
@@ -1011,13 +1011,13 @@ describe Chef::Node::Attribute do
},
{
"one" => "four",
- "snakes" => "on a plane"
+ "snakes" => "on a plane",
},
{
"one" => "six",
- "snack" => "cookies"
+ "snack" => "cookies",
},
- {}
+ {},
)
end
@@ -1046,7 +1046,7 @@ describe Chef::Node::Attribute do
["hut", "three"],
["one", "six"],
["snack", "cookies"],
- ["snakes", "on a plane"]
+ ["snakes", "on a plane"],
]
)
end
@@ -1061,13 +1061,13 @@ describe Chef::Node::Attribute do
},
{
"one" => "four",
- "snakes" => "on a plane"
+ "snakes" => "on a plane",
},
{
"one" => "six",
- "snack" => "cookies"
+ "snack" => "cookies",
},
- {}
+ {},
)
@empty = Chef::Node::Attribute.new({},{},{},{})
@@ -1117,11 +1117,11 @@ describe Chef::Node::Attribute do
it "should output merged attributes" do
default_hash = {
"a" => 1,
- "b" => 2
+ "b" => 2,
}
override_hash = {
"b" => 3,
- "c" => 4
+ "c" => 4,
}
attributes = Chef::Node::Attribute.new(nil, default_hash, override_hash, nil)
expect(attributes.to_s).to eq('{"a"=>1, "b"=>3, "c"=>4}')