summaryrefslogtreecommitdiff
path: root/test/logger/test_severity.rb
blob: f17a3928291984b339f475d9b253fdf7a195ae48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# coding: US-ASCII
# frozen_string_literal: false
require 'test/unit'
require 'logger'

class TestLoggerSeverity < Test::Unit::TestCase
  def test_enum
    logger_levels = Logger.constants
    levels = ["WARN", "UNKNOWN", "INFO", "FATAL", "DEBUG", "ERROR"]
    Logger::Severity.constants.each do |level|
      assert(levels.include?(level.to_s))
      assert(logger_levels.include?(level))
    end
    assert_equal(levels.size, Logger::Severity.constants.size)
  end
end