summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortyler-ball <tyleraball@gmail.com>2014-09-26 13:15:36 -0700
committertyler-ball <tyleraball@gmail.com>2014-10-08 09:07:48 -0700
commit910ce4e5db3a72f00cade9f8f39fa5ba30ed777f (patch)
treee770c6edcf76e95e87aec1b05964dbef526cfc78
parentb6839a6340e05a60f425cd97afb6139a05793750 (diff)
downloadchef-910ce4e5db3a72f00cade9f8f39fa5ba30ed777f.tar.gz
Ruby 1.8.7 does some weird hash printing where it gives different ordering - simplifying test to avoid that
-rw-r--r--spec/unit/json_compat_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/json_compat_spec.rb b/spec/unit/json_compat_spec.rb
index 5951f0cc47..a756d2b459 100644
--- a/spec/unit/json_compat_spec.rb
+++ b/spec/unit/json_compat_spec.rb
@@ -58,13 +58,13 @@ describe Chef::JSONCompat do
describe "when pretty printing an object that defines #to_json" do
class Foo
def to_json(*a)
- Chef::JSONCompat.to_json({'foo' => 1234, 'bar' => {'baz' => 5678}}, *a)
+ Chef::JSONCompat.to_json({'bar' => {'baz' => 5678}}, *a)
end
end
it "should work" do
f = Foo.new
- expect(Chef::JSONCompat.to_json_pretty(f)).to eql("{\n \"foo\": 1234,\n \"bar\": {\n \"baz\": 5678\n }\n}\n")
+ expect(Chef::JSONCompat.to_json_pretty(f)).to eql("{\n \"bar\": {\n \"baz\": 5678\n }\n}\n")
end
include_examples "to_json equalivent to Chef::JSONCompat.to_json" do