summaryrefslogtreecommitdiff
path: root/spec/unit/json_compat_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/json_compat_spec.rb')
-rw-r--r--spec/unit/json_compat_spec.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/unit/json_compat_spec.rb b/spec/unit/json_compat_spec.rb
index 17beba5492..65d931df70 100644
--- a/spec/unit/json_compat_spec.rb
+++ b/spec/unit/json_compat_spec.rb
@@ -102,8 +102,9 @@ describe Chef::JSONCompat do
end
end
- it "should not allow the json gem to be required because of the spec_helper" do
- # We want to prevent ourselves from writing code that requires 'json'
- expect { require 'json' }.to raise_error(LoadError)
+ it "should define .to_json on all classes" do
+ class SomeClass; end
+
+ expect(SomeClass.new.respond_to?(:to_json)).to eq(true)
end
end