From b22c9f9cd0edd08ce7f59194afd7cb02a914c1be Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Mon, 11 Aug 2014 13:44:04 -0700 Subject: fix specs broken due to JSON monkeypatching issues yajl/ffi-yajl vs JSON whitespace issues --- spec/unit/json_compat_spec.rb | 2 +- spec/unit/knife/node_show_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/unit/json_compat_spec.rb b/spec/unit/json_compat_spec.rb index c0fb8be6ac..6d262734fd 100644 --- a/spec/unit/json_compat_spec.rb +++ b/spec/unit/json_compat_spec.rb @@ -48,7 +48,7 @@ describe Chef::JSONCompat do it "should work" do f = Foo.new - expect(Chef::JSONCompat.to_json_pretty(f)).to eql("{\n \"foo\": 1234\n}") + expect(Chef::JSONCompat.to_json_pretty(f)).to eql("{\n \"foo\": 1234\n}\n") end end diff --git a/spec/unit/knife/node_show_spec.rb b/spec/unit/knife/node_show_spec.rb index 4ecf2778e6..4806354b60 100644 --- a/spec/unit/knife/node_show_spec.rb +++ b/spec/unit/knife/node_show_spec.rb @@ -59,7 +59,7 @@ describe Chef::Knife::NodeShow do allow(knife.ui).to receive(:stdout).and_return(stdout) expect(Chef::Node).to receive(:load).with('adam').and_return(node) knife.run - expect(stdout.string).to eql("{\n \"name\": \"adam\",\n \"chef_environment\": \"_default\",\n \"run_list\": [\n\n ],\n \"normal\": {\n }\n}\n") + expect(stdout.string).to eql("{\n \"name\": \"adam\",\n \"chef_environment\": \"_default\",\n \"run_list\": [\n\n]\n,\n \"normal\": {\n\n }\n}\n") end end end -- cgit v1.2.1