Sha256: c33e14347a42d9387eccda87b93b28f9bb07fa9d581f9bd4a7836edbda20c1a7

Contents?: true

Size: 601 Bytes

Versions: 10

Compression:

Stored size: 601 Bytes

Contents

require 'test_helper'

module ActiveModelSerializers
  class LoggerTest < ActiveSupport::TestCase
    def test_logger_is_set_to_action_controller_logger_when_initializer_runs
      assert_equal $action_controller_logger, ActionController::Base.logger # rubocop:disable Style/GlobalVars
    end

    def test_logger_can_be_set
      original_logger = ActiveModelSerializers.logger
      logger = Logger.new(STDOUT)

      ActiveModelSerializers.logger = logger

      assert_equal ActiveModelSerializers.logger, logger
    ensure
      ActiveModelSerializers.logger = original_logger
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
active_model_serializers-0.10.8 test/logger_test.rb
active_model_serializers-0.10.7 test/logger_test.rb
active_model_serializers-0.10.6 test/logger_test.rb
active_model_serializers-0.10.5 test/logger_test.rb
active_model_serializers-0.10.4 test/logger_test.rb
agi_active_model_serializers-0.10.9 test/logger_test.rb
agi_active_model_serializers-0.10.8 test/logger_test.rb
agi_active_model_serializers-0.10.7 test/logger_test.rb
active_model_serializers-0.10.3 test/logger_test.rb
active_model_serializers-0.10.2 test/logger_test.rb