Sha256: b68d7fb2e510fa06b66409049d9f1f72c1be31c00b1c3300f0b82d46cd99c641
Contents?: true
Size: 584 Bytes
Versions: 8
Compression:
Stored size: 584 Bytes
Contents
require "rspec/expectations" RSpec::Matchers.define :have_matched do |expected_root| match do |actual| actual.matches? && (expected_root.nil? || actual.root == expected_root) end failure_message do |actual| if actual.matches? "expected a match against '#{expected_root.inspect}', " \ "but got a match against '#{actual.root.inspect}'" else "expected a match, but got none" end end failure_message_when_negated do |actual| if actual.matches? "expected no match, but got a match against #{actual.root.inspect}" end end end
Version data entries
8 entries across 8 versions & 1 rubygems