module RR::Adapters::TestUnit
Public Class Methods
included(mod)
click to toggle source
# File lib/rr/adapters/test_unit.rb, line 6 def self.included(mod) RR.trim_backtrace = true mod.class_eval do unless instance_methods.detect {|method_name| method_name.to_sym == :setup_with_rr} alias_method :setup_without_rr, :setup def setup_with_rr setup_without_rr RR.reset end alias_method :setup, :setup_with_rr alias_method :teardown_without_rr, :teardown def teardown_with_rr RR.verify teardown_without_rr end alias_method :teardown, :teardown_with_rr end end end
Public Instance Methods
assert_received(subject, &block)
click to toggle source
# File lib/rr/adapters/test_unit.rb, line 28 def assert_received(subject, &block) block.call(received(subject)).call end
setup_with_rr()
click to toggle source
# File lib/rr/adapters/test_unit.rb, line 12 def setup_with_rr setup_without_rr RR.reset end
teardown_with_rr()
click to toggle source
# File lib/rr/adapters/test_unit.rb, line 19 def teardown_with_rr RR.verify teardown_without_rr end