Sha256: 56436d172e5d11832c79924992013c4030379b5a953d90d87ca8fe88fb4b66dc
Contents?: true
Size: 328 Bytes
Versions: 1
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/requests/json_schemas" schema_path = "#{schema_directory}/#{schema}.json" JSON::Validator.validate!(schema_path, response, strict: true) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hexx-1.1.0 | lib/generators/install/templates/spec/json_schema.erb |