Class: Test::Unit::TestCase

Inherits:
MiniTest::Spec
  • Object
show all
Extended by:
MiniTest::Spec::Magic::Context
Includes:
MiniTest::Spec::Magic::Assertions, MiniTest::Spec::Magic::Expectations
Defined in:
lib/minitest/spec/magic.rb,
lib/test/unit/testcase.rb

Overview

Extend Test::Unit::TestCase

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.method_defined?(sym, *args) ⇒ Boolean

Ensure ActiveSupport::TestCase::Declarative doesn’t override MiniTest::Spec’s ‘describe`

Returns:

  • (Boolean)


8
9
10
# File 'lib/test/unit/testcase.rb', line 8

def self.method_defined?(sym, *args)
  sym.to_sym == :describe || super
end

Instance Method Details

#build_message(head, template = nil, *arguments) ⇒ Object



12
13
14
15
# File 'lib/test/unit/testcase.rb', line 12

def build_message(head, template=nil, *arguments)
  template &&= template.chomp
  template.gsub(/\?/) { arguments.shift.inspect.chomp }
end