Sha256: 6b829b6a7253f9ecd1d017ac8e57e19785cfe72931def2b5907c776f1a48c136

Contents?: true

Size: 294 Bytes

Versions: 1

Compression:

Stored size: 294 Bytes

Contents

if RSpec.respond_to?(:configure)
  RSpec::Matchers.define :match_response_schema do |schema_name|
    match do |response|
      schema_path = JSON::Matchers.path_to_schema(schema_name)
      matcher = JSON::Matchers::Matcher.new(schema_path)

      matcher.matches?(response)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
json-matchers-0.1.0 lib/json/matchers/rspec.rb