Class: AktionTest::Matchers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/aktion_test/matchers/base.rb

Instance Method Summary collapse

Constructor Details

#initializeBase

Returns a new instance of Base.



4
5
6
# File 'lib/aktion_test/matchers/base.rb', line 4

def initialize
  @matches = nil
end

Instance Method Details

#failure_messageObject



14
15
16
# File 'lib/aktion_test/matchers/base.rb', line 14

def failure_message
  message(false)
end

#matches?(subject) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
11
12
# File 'lib/aktion_test/matchers/base.rb', line 8

def matches?(subject)
  return @matches unless @matches.nil?
  @subject = subject
  @matches = !!perform_match!
end

#negative_failure_messageObject



18
19
20
# File 'lib/aktion_test/matchers/base.rb', line 18

def negative_failure_message
  message(true)
end