Sha256: 189d73921619669949507a449915e61db9331d9679ad976f418c30e3674bcf6c
Contents?: true
Size: 681 Bytes
Versions: 4
Compression:
Stored size: 681 Bytes
Contents
# frozen_string_literal: true RSpec::Matchers.define :be_existing_file do |_| match { |actual| File.file?(actual) } failure_message do |actual| format('expected that file "%s" exists', actual) end failure_message_when_negated do |actual| format('expected that file "%s" does not exist', actual) end end RSpec::Matchers.define :have_content do |expected| match { |actual| File.read(actual).chomp == expected.chomp } failure_message do |actual| format("expected that file \"%s\" contains:\n%s", actual, expected) end failure_message_when_negated do |actual| format("expected that file \"%s\" does not contain:\n%s", actual, expected) end end
Version data entries
4 entries across 4 versions & 1 rubygems