# File lib/rr/adapters/minitest.rb, line 6 def self.included(mod) RR.trim_backtrace = true mod.class_eval do unless instance_methods.any? { |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 rescue RR::Errors::RRError => rr_error assertion = ::MiniTest::Assertion.new(rr_error.message) assertion.set_backtrace(rr_error.backtrace) raise assertion ensure teardown_without_rr end alias_method :teardown, :teardown_with_rr end end end
# File lib/rr/adapters/minitest.rb, line 32 def assert_received(subject, &block) block.call(received(subject)).call end
# File lib/rr/adapters/minitest.rb, line 11 def setup_with_rr setup_without_rr RR.reset end
# File lib/rr/adapters/minitest.rb, line 18 def teardown_with_rr RR.verify rescue RR::Errors::RRError => rr_error assertion = ::MiniTest::Assertion.new(rr_error.message) assertion.set_backtrace(rr_error.backtrace) raise assertion ensure teardown_without_rr end
Generated with the Darkfish Rdoc Generator 2.