Class: ActiveSupport::TestCase
- Extended by:
- ActiveSupport::Testing::Declarative
- Includes:
- ActiveRecord::TestFixtures, ActiveSupport::Testing::Assertions, ActiveSupport::Testing::Deprecation, ActiveSupport::Testing::SetupAndTeardown, ActiveSupport::Testing::TaggedLogging
- 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 collapse
- Assertion =
Minitest::Assertion
Class Method Summary collapse
- .for_tag(tag) ⇒ Object
-
.test_order ⇒ Object
FIXME: we have tests that depend on run order, we should fix that and remove this method.
Instance Method Summary collapse
-
#assert_nothing_raised(*args) ⇒ Object
Fails if the block raises an exception.
Methods included from ActiveSupport::Testing::Declarative
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, extended, #included
Methods included from ActiveSupport::Testing::Deprecation
#assert_deprecated, #assert_not_deprecated
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
Class Method Details
.for_tag(tag) ⇒ Object
42 43 44 |
# File 'activesupport/lib/active_support/test_case.rb', line 42 def self.for_tag(tag) yield if $tags[tag] end |
.test_order ⇒ Object
FIXME: we have tests that depend on run order, we should fix that and remove this method.
48 49 50 |
# File 'activesupport/lib/active_support/test_case.rb', line 48 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
79 80 81 |
# File 'activesupport/lib/active_support/test_case.rb', line 79 def assert_nothing_raised(*args) yield end |