Sha256: 92e201be960169feae4152d467f8b5764bf8b3397e8b1b66fbf5aec9ac8df11d
Contents?: true
Size: 615 Bytes
Versions: 14
Compression:
Stored size: 615 Bytes
Contents
RSpec::Matchers.define :match_example do |verb, resource, status = 200| match do |actual| expected_example = RamlParser.find_response_example(verb, resource, status) raise "Not found '#{verb.to_s.upcase} #{resource} #{status}' in '#{schema_file}'" unless expected_example # NOTE: when empty response, FaradayMiddleware::ParseJson convert to nil return true if status == 204 && actual.nil? && expected_example.empty? actual == expected_example end description do expected_example = RamlParser.find_response_example(verb, resource, status) "match '#{expected_example}'" end end
Version data entries
14 entries across 14 versions & 1 rubygems