Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tag: v4.0.0.beta1
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (23 sloc) 0.664 kB
module ActiveSupport
module Testing
# Logs a "PostsControllerTest: test name" heading before each test to
# make test.log easier to search and follow along with.
module TaggedLogging #:nodoc:
attr_writer :tagged_logger
def before_setup
if tagged_logger
heading = "#{self.class}: #{__name__}"
divider = '-' * heading.size
tagged_logger.info divider
tagged_logger.info heading
tagged_logger.info divider
end
super
end
private
def tagged_logger
@tagged_logger ||= (defined?(Rails.logger) && Rails.logger)
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.