Sha256: 81237d696d18e0d90fcd22579cc841a7a9b4e24172bc0055bdb8f7f1de5277e3

Contents?: true

Size: 660 Bytes

Versions: 46

Compression:

Stored size: 660 Bytes

Contents

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

Version data entries

46 entries across 46 versions & 4 rubygems

Version Path
activesupport-4.1.16 lib/active_support/testing/tagged_logging.rb
activesupport-4.1.16.rc1 lib/active_support/testing/tagged_logging.rb
activesupport-4.1.15 lib/active_support/testing/tagged_logging.rb
activesupport-4.1.15.rc1 lib/active_support/testing/tagged_logging.rb
activesupport-4.1.14.2 lib/active_support/testing/tagged_logging.rb
activesupport-4.1.14.1 lib/active_support/testing/tagged_logging.rb
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/activesupport-4.1.13/lib/active_support/testing/tagged_logging.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/activesupport-4.1.13/lib/active_support/testing/tagged_logging.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/activesupport-4.1.13/lib/active_support/testing/tagged_logging.rb
activesupport-4.1.14 lib/active_support/testing/tagged_logging.rb
activesupport-4.1.14.rc2 lib/active_support/testing/tagged_logging.rb
activesupport-4.1.14.rc1 lib/active_support/testing/tagged_logging.rb
activesupport-4.1.13 lib/active_support/testing/tagged_logging.rb
activesupport-4.1.13.rc1 lib/active_support/testing/tagged_logging.rb
activesupport-4.1.12 lib/active_support/testing/tagged_logging.rb
activesupport-4.1.12.rc1 lib/active_support/testing/tagged_logging.rb
activesupport-4.1.11 lib/active_support/testing/tagged_logging.rb
activesupport-4.1.10 lib/active_support/testing/tagged_logging.rb
activesupport-4.1.10.rc4 lib/active_support/testing/tagged_logging.rb
activesupport-4.1.10.rc3 lib/active_support/testing/tagged_logging.rb