Sha256: 20e377d8b5f60ed057db43f5abfae69e0cd221f3be55f4e0f0da7165689db0ad

Contents?: true

Size: 906 Bytes

Versions: 6

Compression:

Stored size: 906 Bytes

Contents

require File.expand_path('../setup', File.dirname(__FILE__))

module TestLogging
module TestConfig

  class TestYamlConfigurator < Test::Unit::TestCase
    include LoggingTestCase

    def test_class_load
      assert_raise(::Logging::Config::YamlConfigurator::Error) {
        ::Logging::Config::YamlConfigurator.load(Object.new)
      }

      begin
        fd = File.open('data/logging.yaml','r')
        assert_nothing_raised {
          ::Logging::Config::YamlConfigurator.load(fd)
        }
      ensure
        fd.close
      end
    end

    def test_initialize
      io = StringIO.new
      io << YAML.dump({:one => 1, :two => 2, :three => 3})
      io.seek 0

      assert_raise(::Logging::Config::YamlConfigurator::Error) {
        ::Logging::Config::YamlConfigurator.new(io, :meh)
      }
    end

  end  # class TestYamlConfigurator

end  # module TestConfig
end  # module TestLogging

# EOF

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
logging-1.6.2 test/config/test_yaml_configurator.rb
logging-1.6.1 test/config/test_yaml_configurator.rb
logging-1.6.0 test/config/test_yaml_configurator.rb
logging-1.5.2 test/config/test_yaml_configurator.rb
logging-1.5.1 test/config/test_yaml_configurator.rb
logging-1.5.0 test/config/test_yaml_configurator.rb