Class: Matchi::Eq

Inherits:
Eql
  • Object
show all
Defined in:
lib/matchi/rspec/eq.rb

Overview

Equivalence matcher.

Instance Method Summary collapse

Instance Method Details

#to_hHash

Returns a hash of one key-value pair with a key corresponding to the

matcher and a value corresponding to its initialize parameters.


16
17
18
# File 'lib/matchi/rspec/eq.rb', line 16

def to_h
  { Eq: [@expected] }
end

#to_sString

Returns a string representing the matcher.



8
9
10
# File 'lib/matchi/rspec/eq.rb', line 8

def to_s
  "eq #{@expected.inspect}"
end