summaryrefslogtreecommitdiff
path: root/spec/support/matchers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/matchers.rb')
-rw-r--r--spec/support/matchers.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/support/matchers.rb b/spec/support/matchers.rb
index 595cd17..66bb92c 100644
--- a/spec/support/matchers.rb
+++ b/spec/support/matchers.rb
@@ -2,8 +2,9 @@ RSpec::Matchers.define :match_schema do |version: '2.0'|
def schema_for(version)
License::Management.root.join("spec/fixtures/schema/v#{version}.json").to_s
end
+
match do |actual|
- !actual.nil? && (@errors = JSON::Validator.fully_validate(schema_for(version), actual)).empty?
+ !actual.nil? && (@errors = JSON::Validator.fully_validate(schema_for(version), actual.to_h)).empty?
end
failure_message do |response|