123456789_123456789_123456789_123456789_123456789_

Module: ActiveSupport::Testing::TestsWithoutAssertions

Do not use. This module is for internal use only.

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