summaryrefslogtreecommitdiff
path: root/spec/unit/role_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/role_spec.rb')
-rw-r--r--spec/unit/role_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/role_spec.rb b/spec/unit/role_spec.rb
index ecc7945a08..6e9b133c50 100644
--- a/spec/unit/role_spec.rb
+++ b/spec/unit/role_spec.rb
@@ -201,7 +201,7 @@ describe Chef::Role do
describe "and it has per-environment run lists" do
before do
@role.env_run_lists("_default" => ['one', 'two', 'role[a]'], "production" => ['role[monitoring]', 'role[auditing]', 'role[apache]'], "dev" => ["role[nginx]"])
- @serialized_role = Chef::JSONCompat.from_json(Chef::JSONCompat.to_json(@role), :create_additions => false)
+ @serialized_role = Chef::JSONCompat.parse(Chef::JSONCompat.to_json(@role), :create_additions => false)
end
it "includes the per-environment run lists" do
@@ -229,7 +229,7 @@ describe Chef::Role do
@role.run_list('one', 'two', 'role[a]')
@role.default_attributes({ 'el_groupo' => 'nuevo' })
@role.override_attributes({ 'deloused' => 'in the comatorium' })
- @deserial = Chef::JSONCompat.from_json(Chef::JSONCompat.to_json(@role))
+ @deserial = Chef::Role.from_hash(Chef::JSONCompat.parse(Chef::JSONCompat.to_json(@role)))
end
it "should deserialize to a Chef::Role object" do