Sha256: a9411fd6318b4ae6ef5f37a66484d3b51125c1f265164e90c7b5cea7930e5a49

Contents?: true

Size: 270 Bytes

Versions: 12

Compression:

Stored size: 270 Bytes

Contents

RSpec::Matchers.define :match_response_schema do |schema|
  match do |response|
    schema_directory = "#{Dir.pwd}/spec/api/schemas"
    schema_path = "#{schema_directory}/#{schema}.json"
    JSON::Validator.validate!(schema_path, response.body, strict: true)
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
doorkeeper_sso-0.4.9 spec/support/api_schema_matcher.rb
doorkeeper_sso-0.4.8 spec/support/api_schema_matcher.rb
doorkeeper_sso-0.4.6 spec/support/api_schema_matcher.rb
doorkeeper_sso-0.4.3 spec/support/api_schema_matcher.rb
doorkeeper_sso-0.4.1 spec/support/api_schema_matcher.rb
doorkeeper_sso-0.4.0 spec/support/api_schema_matcher.rb
doorkeeper_sso-0.2.7 spec/support/api_schema_matcher.rb
doorkeeper_sso-0.2.6 spec/support/api_schema_matcher.rb
doorkeeper_sso-0.2.5 spec/support/api_schema_matcher.rb
doorkeeper_sso-0.2.3 spec/support/api_schema_matcher.rb
doorkeeper_sso-0.2.2 spec/support/api_schema_matcher.rb
doorkeeper_sso-0.2.0 spec/support/api_schema_matcher.rb