class RR::Integrations::MiniTest4ActiveSupport

Public Class Methods

new() click to toggle source
# File lib/rr/integrations/minitest_4_active_support.rb, line 4
def initialize
  @mt_adapter = parent_adapter_class.new
end

Public Instance Methods

applies?() click to toggle source
# File lib/rr/integrations/minitest_4_active_support.rb, line 16
def applies?
  @mt_adapter.applies? && defined?(::ActiveSupport::TestCase)
end
hook() click to toggle source
# File lib/rr/integrations/minitest_4_active_support.rb, line 20
def hook
  parent_adapter_class = self.parent_adapter_class
  ::ActiveSupport::TestCase.class_eval do
    include RR::Adapters::RRMethods
    include parent_adapter_class::Mixin

    setup do
      RR.reset
      RR.trim_backtrace = true
      RR.overridden_error_class = ::ActiveSupport::TestCase::Assertion
    end

    teardown do
      RR.verify
    end
  end
end
name() click to toggle source
# File lib/rr/integrations/minitest_4_active_support.rb, line 12
def name
  'MiniTest 4 + ActiveSupport'
end
parent_adapter_class() click to toggle source
# File lib/rr/integrations/minitest_4_active_support.rb, line 8
def parent_adapter_class
  MiniTest4
end