Sha256: c9b157b5de446874a556457106f07625eacbe4df18b58628977b72a518286cd1
Contents?: true
Size: 328 Bytes
Versions: 5
Compression:
Stored size: 328 Bytes
Contents
# Matchers to check a json schema require "json-schema" RSpec::Matchers.define :match_json_schema do |schema| match do |response| schema_directory = "#{Dir.pwd}/spec/examples/json_schemas" schema_path = "#{schema_directory}/#{schema}.json" JSON::Validator.validate!(schema_path, response, strict: true) end end
Version data entries
5 entries across 5 versions & 1 rubygems