summaryrefslogtreecommitdiff
path: root/spec/unit/exceptions_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/exceptions_spec.rb')
-rw-r--r--spec/unit/exceptions_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/exceptions_spec.rb b/spec/unit/exceptions_spec.rb
index 3e7b1ba93f..21b0abb9bf 100644
--- a/spec/unit/exceptions_spec.rb
+++ b/spec/unit/exceptions_spec.rb
@@ -74,5 +74,11 @@ describe Chef::Exceptions do
it "should have an exception class of #{exception} which inherits from #{expected_super_class}" do
lambda{ raise exception }.should raise_error(expected_super_class)
end
+
+ if exception.methods.include?(:to_json)
+ include_examples "to_json equalivent to Chef::JSONCompat.to_json" do
+ let(:jsonable) { exception }
+ end
+ end
end
end