Sha256: 7dfdae3bc9469101a0aafb41be25209f3d7a1ebe6a3146f8b9b7328b170cbb07
Contents?: true
Size: 759 Bytes
Versions: 11
Compression:
Stored size: 759 Bytes
Contents
require 'rspec/matchers' # @see https://rubygems.org/gems/rspec require_relative 'support/extensions' RSpec::Matchers.define :produce_jsonld do |expected, logger| match do |actual| expect(actual).to be_equivalent_jsonld expected end failure_message do |actual| "Expected: #{expected.is_a?(String) ? expected : expected.to_json(JSON_STATE) rescue 'malformed json'}\n" + "Actual : #{actual.is_a?(String) ? actual : actual.to_json(JSON_STATE) rescue 'malformed json'}\n" + "\nDebug:\n#{logger}" end failure_message_when_negated do |actual| "Expected not to produce the following:\n" + "Actual : #{actual.is_a?(String) ? actual : actual.to_json(JSON_STATE) rescue 'malformed json'}\n" + "\nDebug:\n#{logger}" end end
Version data entries
11 entries across 11 versions & 1 rubygems