summaryrefslogtreecommitdiff
path: root/chef/spec/unit/node_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'chef/spec/unit/node_spec.rb')
-rw-r--r--chef/spec/unit/node_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/chef/spec/unit/node_spec.rb b/chef/spec/unit/node_spec.rb
index 469720706c..8e896073ac 100644
--- a/chef/spec/unit/node_spec.rb
+++ b/chef/spec/unit/node_spec.rb
@@ -487,7 +487,7 @@ describe Chef::Node do
describe "json" do
it "should serialize itself as json" do
@node.find_file("test.example.com")
- json = @node.to_json()
+ json = Chef::JSON.to_json(@node)
json.should =~ /json_class/
json.should =~ /name/
json.should =~ /normal/
@@ -498,8 +498,8 @@ describe Chef::Node do
it "should deserialize itself from json" do
@node.find_file("test.example.com")
- json = @node.to_json
- serialized_node = JSON.parse(json)
+ json = Chef::JSON.to_json(@node)
+ serialized_node = Chef::JSON.from_json(json)
serialized_node.should be_a_kind_of(Chef::Node)
serialized_node.name.should eql(@node.name)
@node.each_attribute do |k,v|