summaryrefslogtreecommitdiff
path: root/chef/spec/unit/role_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'chef/spec/unit/role_spec.rb')
-rw-r--r--chef/spec/unit/role_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/chef/spec/unit/role_spec.rb b/chef/spec/unit/role_spec.rb
index 548faaac7c..fbb0b3c40a 100644
--- a/chef/spec/unit/role_spec.rb
+++ b/chef/spec/unit/role_spec.rb
@@ -115,11 +115,11 @@ describe Chef::Role do
@role.run_list('one', 'two', 'role[a]')
@role.default_attributes({ :el_groupo => 'nuevo' })
@role.override_attributes({ :deloused => 'in the comatorium' })
- @serial = @role.to_json
+ @serial = Chef::JSON.to_json(@role)
end
it "should serialize to a json hash" do
- @role.to_json.should match(/^\{.+\}$/)
+ Chef::JSON.to_json(@role).should match(/^\{.+\}$/)
end
%w{
@@ -151,7 +151,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 = JSON.parse(@role.to_json)
+ @deserial = Chef::JSON.from_json(Chef::JSON.to_json(@role))
end
it "should deserialize to a Chef::Role object" do