Module: ActiveSupport::Testing::TestsWithoutAssertions
Do not use. This module is for internal use only.
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
::ActionCable::Channel::TestCase ,
::ActionCable::Connection::TestCase ,
::ActionCable::TestCase ,
::ActionController::TestCase ,
::ActionDispatch::IntegrationTest ,
::ActionDispatch::SystemTestCase ,
::ActionMailbox::TestCase ,
::ActionMailer::TestCase ,
::ActionView::TestCase ,
::ActiveJob::TestCase ,
::ActiveSupport::TestCase ,
::Rails::Generators::TestCase
| |
Defined in: | activesupport/lib/active_support/testing/tests_without_assertions.rb |
Overview
Warns when a test case does not perform any assertions.
This is helpful in detecting broken tests that do not perform intended assertions.
Instance Method Summary
Instance Method Details
#after_teardown
[ GitHub ]# File 'activesupport/lib/active_support/testing/tests_without_assertions.rb', line 9
def after_teardown super if assertions.zero? && !skipped? && !error? file, line = method(name).source_location warn "Test is missing assertions: `#{name}` #{file}:#{line}" end end