summaryrefslogtreecommitdiff
path: root/spec/unit/data_bag_item_spec.rb
diff options
context:
space:
mode:
authortyler-ball <tyleraball@gmail.com>2014-09-24 09:18:47 -0700
committertyler-ball <tyleraball@gmail.com>2014-10-07 16:39:56 -0700
commit1c7b4629240c49e02c482da6de1a6a2cc574304e (patch)
tree4ac2fdc415837aca9b15e6c93debda44858cbf9b /spec/unit/data_bag_item_spec.rb
parent1343bdfff0d54e20b923211f6697d42c484c1627 (diff)
downloadchef-1c7b4629240c49e02c482da6de1a6a2cc574304e.tar.gz
Trying to eradicate all traces of the JSON gem from Chef
Diffstat (limited to 'spec/unit/data_bag_item_spec.rb')
-rw-r--r--spec/unit/data_bag_item_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/unit/data_bag_item_spec.rb b/spec/unit/data_bag_item_spec.rb
index ead0dadfa2..f28450ef72 100644
--- a/spec/unit/data_bag_item_spec.rb
+++ b/spec/unit/data_bag_item_spec.rb
@@ -166,7 +166,7 @@ describe Chef::DataBagItem do
before(:each) do
@data_bag_item.data_bag('mars_volta')
@data_bag_item.raw_data = { "id" => "octahedron", "snooze" => { "finally" => :world_will }}
- @deserial = Chef::JSONCompat.from_json(@data_bag_item.to_json)
+ @deserial = Chef::JSONCompat.from_json(Chef::JSONCompat.to_json(@data_bag_item))
end
it "should deserialize to a Chef::DataBagItem object" do
@@ -184,6 +184,10 @@ describe Chef::DataBagItem do
it "should have a matching 'snooze' key" do
@deserial["snooze"].should == { "finally" => "world_will" }
end
+
+ include_examples "to_json equalivent to Chef::JSONCompat.to_json" do
+ let(:subject) { @data_bag_item }
+ end
end
describe "when converting to a string" do