Class: TarkaMatchers::Matchers::Expectation::Fail
- Defined in:
- lib/tarka_matchers/matchers/expectation/fail.rb
Instance Method Summary collapse
- #description ⇒ Object
- #failure_message ⇒ Object
- #failure_message_when_negated ⇒ Object
- #matches?(expectation) ⇒ Boolean
- #report ⇒ Object
- #supports_block_expectations? ⇒ Boolean
Instance Method Details
#description ⇒ Object
17 18 19 |
# File 'lib/tarka_matchers/matchers/expectation/fail.rb', line 17 def description "fail." end |
#failure_message ⇒ Object
25 26 27 |
# File 'lib/tarka_matchers/matchers/expectation/fail.rb', line 25 def "#{description} #{report}" end |
#failure_message_when_negated ⇒ Object
29 30 31 |
# File 'lib/tarka_matchers/matchers/expectation/fail.rb', line 29 def "#{description} #{report}" end |
#matches?(expectation) ⇒ Boolean
12 13 14 15 |
# File 'lib/tarka_matchers/matchers/expectation/fail.rb', line 12 def matches? expectation @actual = TarkaMatchers::Helpers::Expectation::Result.pass?{ expectation.call } @actual != true end |
#report ⇒ Object
21 22 23 |
# File 'lib/tarka_matchers/matchers/expectation/fail.rb', line 21 def report "Spec result: #{@actual}" end |
#supports_block_expectations? ⇒ Boolean
10 |
# File 'lib/tarka_matchers/matchers/expectation/fail.rb', line 10 def supports_block_expectations?; true; end |