diff options
Diffstat (limited to 'spec/support/api/schema_matcher.rb')
-rw-r--r-- | spec/support/api/schema_matcher.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/support/api/schema_matcher.rb b/spec/support/api/schema_matcher.rb index 929b637e5eb..e42d727672b 100644 --- a/spec/support/api/schema_matcher.rb +++ b/spec/support/api/schema_matcher.rb @@ -1,9 +1,8 @@ -RSpec::Matchers.define :match_response_schema do |schema, options = {}| +RSpec::Matchers.define :match_response_schema do |schema, **options| match do |response| schema_directory = "#{Dir.pwd}/spec/fixtures/api/schemas" schema_path = "#{schema_directory}/#{schema}.json" - list = options.fetch(:array, false) - JSON::Validator.validate!(schema_path, response.body, list: list) + JSON::Validator.validate!(schema_path, response.body, options) end end |