summaryrefslogtreecommitdiff
path: root/lib/chef/json_compat.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@getchef.com>2014-08-08 15:55:28 -0700
committerdanielsdeleo <dan@getchef.com>2014-08-10 09:40:36 -0700
commit11f7b2c725db4384787f76c4c5229f98c8694e95 (patch)
treeec99bf199d8a9fe14c90aab2e234a219b2bd447c /lib/chef/json_compat.rb
parent674cc65dc68b9d5f0eaa36f2409c6c12becf2c11 (diff)
downloadchef-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 'lib/chef/json_compat.rb')
-rw-r--r--lib/chef/json_compat.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/chef/json_compat.rb b/lib/chef/json_compat.rb
index 2dbb607d9b..0f182508b9 100644
--- a/lib/chef/json_compat.rb
+++ b/lib/chef/json_compat.rb
@@ -18,6 +18,7 @@
# Wrapper class for interacting with JSON.
require 'ffi_yajl'
+require 'json'
require 'ffi_yajl/json_gem' # XXX: parts of chef require JSON gem's Hash#to_json monkeypatch
class Chef