class RR::Integrations::TestUnit2ActiveSupport
Public Class Methods
new()
click to toggle source
# File lib/rr/integrations/test_unit_2_active_support.rb, line 4 def initialize @tu2_adapter = RR.adapters_by_name[:TestUnit2] end
Public Instance Methods
applies?()
click to toggle source
# File lib/rr/integrations/test_unit_2_active_support.rb, line 12 def applies? @tu2_adapter.applies? && defined?(::ActiveSupport::TestCase) end
hook()
click to toggle source
# File lib/rr/integrations/test_unit_2_active_support.rb, line 17 def hook RR.trim_backtrace = true RR.overridden_error_class = ::Test::Unit::AssertionFailedError ::ActiveSupport::TestCase.class_eval do include RR::Adapters::RRMethods include TestUnit1::Mixin setup do RR.reset end teardown do RR.verify end end end
name()
click to toggle source
# File lib/rr/integrations/test_unit_2_active_support.rb, line 8 def name "#{@tu2_adapter.name} + ActiveSupport" end