Module: RSpec::Matchers
- Defined in:
- lib/saharspec/matchers/eq_multiline.rb,
lib/saharspec/matchers/send_message.rb
Instance Method Summary collapse
-
#eq_multiline(expected) ⇒ Object
Allows to pretty test multiline strings with complex indentation (for example, results of code generation).
-
#send_message(target, method) ⇒ Object
Checks if the (block) subject sends specified message to specified object.
Instance Method Details
#eq_multiline(expected) ⇒ Object
Allows to pretty test multiline strings with complex indentation (for example, results of code generation).
In provided string, removes first and last empty line, trailing spaces and leading spaces up
to | character.
If you need to preserve trailing spaces, end them with another |.
44 45 46 |
# File 'lib/saharspec/matchers/eq_multiline.rb', line 44 def eq_multiline(expected) Saharspec::Matchers::EqMultiline.new(expected) end |