Sha256: 47248045eb7488ebcc66c14bb18652ac4ab0a3cfc7e1fb0375be47597796f921

Contents?: true

Size: 859 Bytes

Versions: 75

Compression:

Stored size: 859 Bytes

Contents

# tests the customization of Log4r levels
class TestCustom < TestCase
  def test_validation
    assert_exception(TypeError) { Configurator.custom_levels "lowercase" }
    assert_exception(TypeError) { Configurator.custom_levels "With space" }
  end

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

Version data entries

75 entries across 45 versions & 4 rubygems

Version Path
depengine-0.0.31 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testcustom.rb
depengine-0.0.31 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testcustom.rb
depengine-0.0.30 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testcustom.rb
depengine-0.0.30 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testcustom.rb
depengine-0.0.29 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testcustom.rb
depengine-0.0.29 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testcustom.rb
depengine-0.0.28 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testcustom.rb
depengine-0.0.28 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testcustom.rb
depengine-0.0.27 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testcustom.rb
depengine-0.0.27 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testcustom.rb
depengine-0.0.26 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testcustom.rb
depengine-0.0.26 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testcustom.rb
depengine-0.0.25 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testcustom.rb
depengine-0.0.25 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testcustom.rb
depengine-0.0.24 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testcustom.rb
depengine-0.0.24 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testcustom.rb
depengine-0.0.23 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testcustom.rb
depengine-0.0.23 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testcustom.rb
depengine-0.0.22 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testcustom.rb
depengine-0.0.22 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testcustom.rb