Sha256: f9f6843dc157315df73519090df8bf112831674e985c006d8ca0cde43c494599

Contents?: true

Size: 877 Bytes

Versions: 61

Compression:

Stored size: 877 Bytes

Contents

require 'test_helper'

# tests the customization of Log4r levels
class TestCustom < TestCase
  include Log4r

  def test_validation
    assert_raise(TypeError) { Configurator.custom_levels "lowercase" }
    assert_raise(TypeError) { Configurator.custom_levels "With space" }
  end

  def test_create
    assert_nothing_raised { Configurator.custom_levels "Foo", "Bar", "Baz" }
    assert_nothing_raised { Configurator.custom_levels }
    assert_nothing_raised { Configurator.custom_levels "Bogus", "Levels" }
  end
#  def test_methods
#    l = Logger.new 'custom1'
#    assert_respond_to(l, :foo)
#    assert_respond_to(l, :foo?)
#    assert_respond_to(l, :bar)
#    assert_respond_to(l, :bar?)
#    assert_respond_to(l, :baz)
#    assert_respond_to(l, :baz?)
#    assert_nothing_raised { Bar }
#    assert_nothing_raised { Baz }
#    assert_nothing_raised { Foo }
#  end

end

Version data entries

61 entries across 53 versions & 12 rubygems

Version Path
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/gems/log4r-1.1.10/tests/testcustom.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/gems/log4r-1.1.10/tests/testcustom.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/3.0.0/gems/log4r-1.1.10/tests/testcustom.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/gems/log4r-1.1.10/tests/testcustom.rb
vagrant-unbundled-2.2.14.0 vendor/bundle/ruby/2.7.0/gems/log4r-1.1.10/tests/testcustom.rb
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/log4r-1.1.10/tests/testcustom.rb
vagrant-unbundled-2.2.9.0 vendor/bundle/ruby/2.7.0/gems/log4r-1.1.10/tests/testcustom.rb
vagrant-unbundled-2.2.8.0 vendor/bundle/ruby/2.7.0/gems/log4r-1.1.10/tests/testcustom.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/log4r-1.1.10/tests/testcustom.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.6.0/gems/log4r-1.1.10/tests/testcustom.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.7.0/gems/log4r-1.1.10/tests/testcustom.rb
vagrant-unbundled-2.2.6.2 vendor/bundle/ruby/2.6.0/gems/log4r-1.1.10/tests/testcustom.rb
vagrant-unbundled-2.2.6.1 vendor/bundle/ruby/2.6.0/gems/log4r-1.1.10/tests/testcustom.rb
vagrant-unbundled-2.2.6.0 vendor/bundle/ruby/2.6.0/gems/log4r-1.1.10/tests/testcustom.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.5.0/gems/log4r-1.1.10/tests/testcustom.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.6.0/gems/log4r-1.1.10/tests/testcustom.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.5.0/gems/log4r-1.1.10/tests/testcustom.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.6.0/gems/log4r-1.1.10/tests/testcustom.rb
vagrant-unbundled-2.2.3.0 vendor/bundle/ruby/2.5.0/gems/log4r-1.1.10/tests/testcustom.rb
vagrant-unbundled-2.2.2.0 vendor/bundle/ruby/2.5.0/gems/log4r-1.1.10/tests/testcustom.rb