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
413 414 415 |
# File 'lib/roby/test/assertions.rb', line 413 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.
428 429 430 |
# File 'lib/roby/test/assertions.rb', line 428 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.
425 426 427 |
# File 'lib/roby/test/assertions.rb', line 425 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.
414 415 416 417 418 419 420 |
# File 'lib/roby/test/assertions.rb', line 414 def ===(exception) return true if matcher === exception if self.class.describe? && (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.
421 |
# File 'lib/roby/test/assertions.rb', line 421 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.
422 |
# File 'lib/roby/test/assertions.rb', line 422 def to_s; matcher.to_s; end |