disu.se

WarningClass

Namespace

Lookout

Ancestors
  1. Output

  2. Value

  3. Object

Warning expectation proxy. Used to expect warning outputs during the execution of the expect block. Warnings are matched by ignoring any trailing newlines and by removing any file/line warning prefixes. This is done as Ruby internally uses two different functions to generate warnings (rb_warn() and rb_warning()).

Constructor

initialize(expectedString)#

Proxies the expected warning output.

Instance Methods

===(otherWarning)Boolean#

Returns true if the receiver #== other or if their classes and normalized expected output #== each other.

diff(otherWarning)Enumerable<String>#

Returns an Enumerable over the formatted operations that would have to be applied to the actual warning output to get the expected warning output after any normalization of the warning outputs have been performed.

to_lookout_expectedExpected::Lookout::Warning#

Returns a wrapper around the receiver, making it an expected value.