Sha256: 401445cb915b9cc4d391306f02cf8e804d024dd3c633af435ae1865c9593d866
Contents?: true
Size: 945 Bytes
Versions: 33
Compression:
Stored size: 945 Bytes
Contents
module RSpec module Matchers # :call-seq: # should eq(expected) # should_not eq(expected) # # Passes if actual == expected. # # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more information about equality in Ruby. # # == Examples # # 5.should eq(5) # 5.should_not eq(3) def eq(expected) Matcher.new :eq, expected do |_expected_| diffable match do |actual| actual == _expected_ end failure_message_for_should do |actual| <<-MESSAGE expected #{_expected_.inspect} got #{actual.inspect} (compared using ==) MESSAGE end failure_message_for_should_not do |actual| <<-MESSAGE expected #{actual.inspect} not to equal #{_expected_.inspect} (compared using ==) MESSAGE end description do "== #{_expected_}" end end end end end
Version data entries
33 entries across 33 versions & 4 rubygems