Module Remarkable::Negative
In: lib/remarkable/negative.rb

Allows Remarkable matchers to work on the negative way. Your matcher has to follow some conventions to allow this to work by default.

In negative cases, expectations can also be found under negative_expectations keys, falling back to expectations. This allows to set customized failure messages.

Methods

Public Instance methods

[Source]

    # File lib/remarkable/negative.rb, line 15
15:     def does_not_match?(subject)
16:       @negative = true
17:       !matches?(subject)
18:     end

[Source]

    # File lib/remarkable/negative.rb, line 10
10:     def matches?(subject)
11:       @negative ||= false
12:       super
13:     end

[Source]

    # File lib/remarkable/negative.rb, line 20
20:     def negative?
21:       @negative
22:     end

[Validate]