Sha256: 8d36114f6a210f2f7d737cc3c11204368a52e789649502664ba1b13d75b50fdf

Contents?: true

Size: 609 Bytes

Versions: 1

Compression:

Stored size: 609 Bytes

Contents

require_relative 'test_helper'

class NoTimestampPatchTest < MiniTest::Test
  def test_patching_sets_correct_formatter_on_new_instances
    patched_logger = Class.new(Logger) do
      include Logger::NoTimestampPatch
    end

    logger = patched_logger.new $stdout
    assert_instance_of Logger::Better::NoTimestampFormatter, logger.formatter
  end

  def test_patching_allows_setting_level_by_symbol
    patched_logger = Class.new(Logger) do
      include Logger::BetterPatch
    end

    logger = patched_logger.new $stdout

    logger.level = :debug
    assert_equal Logger::DEBUG, logger.level
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
logger-better-0.2.2 test/no_timestamp_patch_test.rb