Sha256: 05c1f3f77212258b4802e2cef7efe61d6cd07ff193e65982f72fb295e55a05c6

Contents?: true

Size: 278 Bytes

Versions: 1

Compression:

Stored size: 278 Bytes

Contents

require "json-schema"

RSpec::Matchers.define :match_schema do |schema|
  match do |candidate|
    schema_directory = File.expand_path("../schemas",  __FILE__)
    schema_path = File.join(schema_directory, schema)
    JSON::Validator.validate!(schema_path, candidate)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solidus_signifyd-1.1.0 spec/support/api_schema_matcher.rb