summaryrefslogtreecommitdiff
path: root/spec/unit/api_client_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/api_client_spec.rb
parent1343bdfff0d54e20b923211f6697d42c484c1627 (diff)
downloadchef-1c7b4629240c49e02c482da6de1a6a2cc574304e.tar.gz
Trying to eradicate all traces of the JSON gem from Chef
Diffstat (limited to 'spec/unit/api_client_spec.rb')
-rw-r--r--spec/unit/api_client_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/unit/api_client_spec.rb b/spec/unit/api_client_spec.rb
index 76fc4afb5c..7fb2b310f9 100644
--- a/spec/unit/api_client_spec.rb
+++ b/spec/unit/api_client_spec.rb
@@ -123,6 +123,10 @@ describe Chef::ApiClient do
it "does not include the private key if not present" do
@json.should_not include("private_key")
end
+
+ include_examples "to_json equalivent to Chef::JSONCompat.to_json" do
+ let(:subject) { @client }
+ end
end
describe "when deserializing from JSON" do
@@ -135,7 +139,7 @@ describe Chef::ApiClient do
"validator" => true,
"json_class" => "Chef::ApiClient"
}
- @client = Chef::JSONCompat.from_json(client.to_json)
+ @client = Chef::JSONCompat.from_json(Chef::JSONCompat.to_json(client))
end
it "should deserialize to a Chef::ApiClient object" do