Sha256: e6cb5805176268dfecd6e9a18027fccd871626e3d16e6d5ebb16294cd65bb630
Contents?: true
Size: 559 Bytes
Versions: 24
Compression:
Stored size: 559 Bytes
Contents
# frozen_string_literal: true require "json" RSpec::Matchers.define :contain_json do match do sub_json = expected filename = actual filepath = File.join(project_path, filename) json = JSON.parse(IO.read(filepath), symbolize_names: true) sub_json <= json end failure_message do sub_json = expected filename = actual filepath = File.join(project_path, filename) json = JSON.parse(IO.read(filepath), symbolize_names: true) "in #{filename}, expected to find\n#{sub_json.inspect}\nin\n#{json.inspect}" end end
Version data entries
24 entries across 24 versions & 3 rubygems