Module: Test::Unit::RR::Adapter
Class Method Summary collapse
Instance Method Summary collapse
-
#assert_received(subject, &block) ⇒ Object
-
#assert_rr { ... } ⇒ Object
Verify double declarations by RR in block.
Class Method Details
.reset ⇒ Object
58 59 60 61 |
# File 'lib/test/unit/rr.rb', line 58 def reset ::RR.reset ::RR.trim_backtrace = true end |
Instance Method Details
#assert_received(subject, &block) ⇒ Object
64 65 66 |
# File 'lib/test/unit/rr.rb', line 64 def assert_received(subject, &block) block.call(received(subject)).call end |
#assert_rr { ... } ⇒ Object
Verify double declarations by RR in block. It is useful to clear your double declarations scope.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/test/unit/rr.rb', line 88 def assert_rr begin ::RR.verify ensure ::Test::Unit::RR::Adapter.reset end result = yield begin ::RR.verify ensure ::Test::Unit::RR::Adapter.reset end result end |