Class: Matchi::Eq
- Inherits:
-
Eql
- Object
- Eql
- Matchi::Eq
- Defined in:
- lib/matchi/rspec/eq.rb
Overview
Equivalence matcher.
Instance Method Summary collapse
-
#to_h ⇒ Hash
Returns a hash of one key-value pair with a key corresponding to the matcher and a value corresponding to its initialize parameters.
-
#to_s ⇒ String
Returns a string representing the matcher.
Instance Method Details
#to_h ⇒ Hash
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_s ⇒ String
Returns a string representing the matcher.
8 9 10 |
# File 'lib/matchi/rspec/eq.rb', line 8 def to_s "eq #{@expected.inspect}" end |