Class: ActiveSupport::TestCase

Inherits:
Minitest::Test
  • Object
show all
Extended by:
ActiveSupport::Testing::Declarative
Includes:
ActiveRecord::TestFixtures, ActiveSupport::Testing::Assertions, ActiveSupport::Testing::Deprecation, ActiveSupport::Testing::SetupAndTeardown, ActiveSupport::Testing::TaggedLogging, ActiveSupport::Testing::TimeHelpers
Defined in:
activesupport/lib/active_support/test_case.rb,
railties/lib/rails/test_help.rb

Direct Known Subclasses

ActionController::TestCase, ActionDispatch::IntegrationTest, ActionMailer::TestCase, ActionView::TestCase, ActiveModel::TestCase, Rails::Generators::TestCase

Constant Summary

Assertion =
Minitest::Assertion

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods included from ActiveSupport::Testing::Declarative

extended, test

Methods included from ActiveRecord::TestFixtures

#after_teardown, #before_setup, #enlist_fixture_connections, #run_in_transaction?, #setup_fixtures, #teardown_fixtures

Methods included from Concern

#append_features, #class_methods, extended, #included

Methods included from ActiveSupport::Testing::TimeHelpers

#travel, #travel_back, #travel_to

Methods included from ActiveSupport::Testing::Deprecation

#assert_deprecated, #assert_not_deprecated, #collect_deprecations

Methods included from ActiveSupport::Testing::Assertions

#assert_difference, #assert_no_difference, #assert_not

Methods included from ActiveSupport::Testing::SetupAndTeardown

#after_teardown, #before_setup

Methods included from ActiveSupport::Testing::TaggedLogging

#before_setup

Class Method Details

+ (Object) for_tag(tag)



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

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

Instance Method Details

- (Object) assert_nothing_raised(*args)

Fails if the block raises an exception.

assert_nothing_raised do
  ...
end


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

def assert_nothing_raised(*args)
  yield
end