Class: Roby::Test::Assertions::FlexmockExceptionMatcher Private
- Defined in:
- lib/roby/test/assertions.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Helper matcher used to provide a better error message in the various exception assertions
Deprecated assertions replaced by expect_execution collapse
-
#matcher ⇒ Object
Returns the value of attribute matcher.
Deprecated assertions replaced by expect_execution collapse
- .describe=(flag) ⇒ Object private
- .describe? ⇒ Boolean private
- #===(exception) ⇒ Object private
- #inspect ⇒ Object private
- #to_s ⇒ Object private
Instance Attribute Details
#matcher ⇒ Object
Returns the value of attribute matcher
570 571 572 |
# File 'lib/roby/test/assertions.rb', line 570 def matcher @matcher end |
Class Method Details
.describe=(flag) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
595 596 597 |
# File 'lib/roby/test/assertions.rb', line 595 def self.describe=(flag) @describe = flag end |
.describe? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
591 592 593 |
# File 'lib/roby/test/assertions.rb', line 591 def self.describe? @describe end |
Instance Method Details
#===(exception) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
571 572 573 574 575 576 577 578 579 580 |
# File 'lib/roby/test/assertions.rb', line 571 def ===(exception) return true if matcher === exception return false unless self.class.describe? if (description = matcher.describe_failed_match(exception)) Roby.warn "expected exception to match #{matcher}, "\ "but #{description}" end false end |
#inspect ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
582 583 584 |
# File 'lib/roby/test/assertions.rb', line 582 def inspect to_s end |
#to_s ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
586 587 588 |
# File 'lib/roby/test/assertions.rb', line 586 def to_s matcher.to_s end |