Sha256: 88a082442260e7009d21d91d3faf1d8ed693a2c140fd43d86312620ac3961ef9

Contents?: true

Size: 565 Bytes

Versions: 4

Compression:

Stored size: 565 Bytes

Contents

require 'test_helper'

class ActiveModelSerializers::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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
active_model_serializers-0.10.1 test/logger_test.rb
active_model_serializers-0.10.0 test/logger_test.rb
active_model_serializers-0.10.0.rc5 test/logger_test.rb
active_model_serializers-0.10.0.rc4 test/logger_test.rb