Module: MiniTest

Defined in:
lib/minitest/mock.rb,
lib/minitest/unit.rb

Overview

Minimal (mostly drop-in) replacement for test-unit.

:include: README.txt

Defined Under Namespace

Modules: Assertions, Expectations Classes: Assertion, BacktraceFilter, Mock, Skip, Spec, Unit

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.backtrace_filterObject

Filter object for backtraces.



37
38
39
# File 'lib/minitest/unit.rb', line 37

def backtrace_filter
  @backtrace_filter
end

Class Method Details

.const_missing(name) ⇒ Object

:nodoc:



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/minitest/unit.rb', line 11

def self.const_missing name # :nodoc:
  case name
  when :MINI_DIR then
    msg = "MiniTest::MINI_DIR was removed. Don't violate other's internals."
    warn "WAR\NING: #{msg}"
    warn "WAR\NING: Used by #{caller.first}."
    const_set :MINI_DIR, "bad value"
  else
    super
  end
end

.filter_backtrace(bt) ⇒ Object

:nodoc:



64
65
66
# File 'lib/minitest/unit.rb', line 64

def self.filter_backtrace bt # :nodoc:
  backtrace_filter.filter bt
end