diff options
author | danielsdeleo <dan@getchef.com> | 2014-08-08 15:55:28 -0700 |
---|---|---|
committer | danielsdeleo <dan@getchef.com> | 2014-08-10 09:40:36 -0700 |
commit | 11f7b2c725db4384787f76c4c5229f98c8694e95 (patch) | |
tree | ec99bf199d8a9fe14c90aab2e234a219b2bd447c /spec/unit/environment_spec.rb | |
parent | 674cc65dc68b9d5f0eaa36f2409c6c12becf2c11 (diff) | |
download | chef-11f7b2c725db4384787f76c4c5229f98c8694e95.tar.gz |
Fix expected format of JSON errors in integration tests
The format was previously not stable because chef-zero (or other test
code) would `require 'json'` and undo ffi-yajl's monkey patches to the
JSON gem. We would probably be better off if we can get out of the
business of monkeypatching JSON or attempting to provide compatibility
at all, in which case this commit could be reverted.
Diffstat (limited to 'spec/unit/environment_spec.rb')
-rw-r--r-- | spec/unit/environment_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/unit/environment_spec.rb b/spec/unit/environment_spec.rb index 0e230e46ed..5a2c400d3c 100644 --- a/spec/unit/environment_spec.rb +++ b/spec/unit/environment_spec.rb @@ -420,7 +420,7 @@ describe Chef::Environment do "description" => "desc", "chef_type" => "environment" } - IO.should_receive(:read).with(File.join(Chef::Config[:environment_path], 'foo.json')).and_return(JSON.dump(environment_hash)) + IO.should_receive(:read).with(File.join(Chef::Config[:environment_path], 'foo.json')).and_return(Chef::JSONCompat.to_json(environment_hash)) environment = Chef::Environment.load('foo') environment.should be_a_kind_of(Chef::Environment) |