Class: Matchi::Be
- Inherits:
-
Equal
- Object
- Equal
- Matchi::Be
- Defined in:
- lib/matchi/rspec/be.rb
Overview
Identity 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/be.rb', line 16 def to_h { Be: [@expected] } end |
#to_s ⇒ String
Returns a string representing the matcher.
8 9 10 |
# File 'lib/matchi/rspec/be.rb', line 8 def to_s "be #{@expected.inspect}" end |