diff options
| author | mo khan <mo.khan@gmail.com> | 2020-02-23 17:44:19 -0700 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-02-23 17:44:19 -0700 |
| commit | b68dea9ef5226c4de1f0a320b1f3f1b1cb219a2d (patch) | |
| tree | 0a68fbed1298fbb7a1fa669d27736382c8a2583b /spec | |
| parent | 171348b4c42bf468a00ced2e58780cc9408e5f7f (diff) | |
Assign errors in schema matcher
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/support/matchers.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/support/matchers.rb b/spec/support/matchers.rb index 12bbdf7..595cd17 100644 --- a/spec/support/matchers.rb +++ b/spec/support/matchers.rb @@ -3,7 +3,7 @@ RSpec::Matchers.define :match_schema do |version: '2.0'| License::Management.root.join("spec/fixtures/schema/v#{version}.json").to_s end match do |actual| - !actual.nil? && JSON::Validator.fully_validate(schema_for(version), actual).empty? + !actual.nil? && (@errors = JSON::Validator.fully_validate(schema_for(version), actual)).empty? end failure_message do |response| |
