diff options
| author | mo khan <mo.khan@gmail.com> | 2020-04-14 12:51:18 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-04-14 12:51:18 -0600 |
| commit | 7ca5e094766b70fe8a8783c0c2f33fdeba46d2c5 (patch) | |
| tree | f8c847639a68305b8546f31003faf63d04735984 /spec/support/matchers.rb | |
| parent | bae02b6ae73dda47dc86590b73c21a85bb7273a5 (diff) | |
bundle exec rubocop -a
Diffstat (limited to 'spec/support/matchers.rb')
| -rw-r--r-- | spec/support/matchers.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/support/matchers.rb b/spec/support/matchers.rb index 66bb92c..038c593 100644 --- a/spec/support/matchers.rb +++ b/spec/support/matchers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + 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 @@ -7,7 +9,7 @@ RSpec::Matchers.define :match_schema do |version: '2.0'| !actual.nil? && (@errors = JSON::Validator.fully_validate(schema_for(version), actual.to_h)).empty? end - failure_message do |response| + failure_message do |_response| "didn't match the schema for version #{version}" \ " The validation errors were:\n#{@errors.join("\n")}" end |
