Class: ActiveSupport::TestCase

Inherits:
MiniTest::Unit::TestCase
  • Object
show all
Extended by:
ActiveSupport::Testing::Declarative
Includes:
ActiveSupport::Testing::Assertions, ActiveSupport::Testing::Deprecation, ActiveSupport::Testing::Pending, ActiveSupport::Testing::SetupAndTeardown, ActiveSupport::Testing::TaggedLogging
Defined in:
lib/active_support/test_case.rb

Constant Summary collapse

Assertion =
MiniTest::Assertion

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ActiveSupport::Testing::Declarative

extended, test

Methods included from ActiveSupport::Testing::Pending

#pending

Methods included from ActiveSupport::Testing::Deprecation

#assert_deprecated, #assert_not_deprecated, #collect_deprecations

Methods included from ActiveSupport::Testing::Assertions

#assert_blank, #assert_difference, #assert_no_difference, #assert_not, #assert_present

Methods included from ActiveSupport::Testing::SetupAndTeardown

#after_teardown, #before_setup

Methods included from Concern

#append_features, extended, #included

Methods included from ActiveSupport::Testing::TaggedLogging

#before_setup

Class Method Details

.for_tag(tag) ⇒ Object



25
26
27
# File 'lib/active_support/test_case.rb', line 25

def self.for_tag(tag)
  yield if $tags[tag]
end

.test_orderObject

FIXME: we have tests that depend on run order, we should fix that and remove this method.



31
32
33
# File 'lib/active_support/test_case.rb', line 31

def self.test_order # :nodoc:
  :sorted
end

Instance Method Details

#assert_nothing_raised(*args) ⇒ Object

Fails if the block raises an exception.

assert_nothing_raised do
  ...
end


63
64
65
# File 'lib/active_support/test_case.rb', line 63

def assert_nothing_raised(*args)
  yield
end