Module: UnifiedMatchers::Assertions
- Defined in:
- lib/unified_matchers/assertions.rb
Instance Attribute Summary collapse
-
#matcher ⇒ Object
Returns the value of attribute matcher.
Instance Method Summary collapse
- #assert_data_kind_of(ref, my, aClass) ⇒ Object
- #assert_failure(ref, my) ⇒ Object
- #assert_message_equal(ref, my, aMessage) ⇒ Object
- #assert_success(ref, my) ⇒ Object
Instance Attribute Details
#matcher ⇒ Object
Returns the value of attribute matcher.
10 11 12 |
# File 'lib/unified_matchers/assertions.rb', line 10 def matcher @matcher end |
Instance Method Details
#assert_data_kind_of(ref, my, aClass) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/unified_matchers/assertions.rb', line 22 def assert_data_kind_of ref, my, aClass assert_nothing_raised { @my_matcher_results = matcher[ref, my] } @my_matcher_results.each do |r| assert_kind_of aClass, r.data, r.to_s end end |
#assert_failure(ref, my) ⇒ Object
17 18 19 20 |
# File 'lib/unified_matchers/assertions.rb', line 17 def assert_failure ref, my assert_nothing_raised { @my_matcher_results = matcher[ref, my] } assert @my_matcher_results.failure?, @my_matcher_results.to_s end |
#assert_message_equal(ref, my, aMessage) ⇒ Object
29 30 31 32 33 34 |
# File 'lib/unified_matchers/assertions.rb', line 29 def ref, my, aMessage assert_nothing_raised { @my_matcher_results = matcher[ref, my] } @my_matcher_results.each do |r| assert_equal aMessage, r., r.name end end |
#assert_success(ref, my) ⇒ Object
12 13 14 15 |
# File 'lib/unified_matchers/assertions.rb', line 12 def assert_success ref, my assert_nothing_raised { @my_matcher_results = matcher[ref, my] } assert @my_matcher_results.success?, @my_matcher_results.to_s end |