Sha256: 57edbd02aaaabffaa611f0bdb6f0c8b0dcd6a08e25ca136078f185abe397dc77

Contents?: true

Size: 1.03 KB

Versions: 75

Compression:

Stored size: 1.03 KB

Contents

One=<<-EOX
<log4r_config><pre_config><custom_levels> Foo </custom_levels>
</pre_config></log4r_config>
EOX
Two=<<-EOX
<log4r_config><pre_config><global level="DEBUG"/></pre_config></log4r_config>
EOX
Three=<<-EOX
<log4r_config><pre_config><custom_levels>Foo</custom_levels>
<global level="Foo"/></pre_config>
</log4r_config>
EOX

# must be run independently
class TestXmlConf < TestCase
  def test_load1
    Configurator.load_xml_string(One)
    assert_no_exception{ 
      assert(Foo == 1) 
      assert(Logger.global.level == ALL)
    }
  end
  def test_load2
    Configurator.load_xml_string(Two)
    assert_no_exception{ 
      assert(Logger.global.level == DEBUG)
    }
  end
  def test_load3
    Configurator.load_xml_string(Three)
    assert_no_exception{ 
      assert(Foo == 1) 
      assert(Logger.global.level == Foo)
    }
  end
  def test_load4
    assert_no_exception {
      Configurator['logpath'] = '.'
      Configurator.load_xml_file "xml/testconf.xml"
      a = Logger['first::second']
      a.bing "what the heck"
    }
  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/testxmlconf.rb
depengine-0.0.31 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testxmlconf.rb
depengine-0.0.30 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testxmlconf.rb
depengine-0.0.30 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testxmlconf.rb
depengine-0.0.29 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testxmlconf.rb
depengine-0.0.29 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testxmlconf.rb
depengine-0.0.28 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testxmlconf.rb
depengine-0.0.28 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testxmlconf.rb
depengine-0.0.27 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testxmlconf.rb
depengine-0.0.27 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testxmlconf.rb
depengine-0.0.26 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testxmlconf.rb
depengine-0.0.26 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testxmlconf.rb
depengine-0.0.25 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testxmlconf.rb
depengine-0.0.25 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testxmlconf.rb
depengine-0.0.24 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testxmlconf.rb
depengine-0.0.24 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testxmlconf.rb
depengine-0.0.23 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testxmlconf.rb
depengine-0.0.23 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testxmlconf.rb
depengine-0.0.22 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testxmlconf.rb
depengine-0.0.22 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testxmlconf.rb