Sha256: acd3857726ae89d2a71f79000f49c7939ea3002075baa580a719e177f882047c

Contents?: true

Size: 276 Bytes

Versions: 1

Compression:

Stored size: 276 Bytes

Contents

# frozen_string_literal: true
require 'json-schema'
require 'rspec/expectations'

RSpec::Matchers.define :match_json_schema do |schema, options|
  match do |json|
    options = {strict: true}.merge!(options || {})
    JSON::Validator.validate!(schema, json, options)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
apress-api-1.24.2 lib/apress/api/testing/json_matcher.rb