Sha256: e3c47e9c10742c600838da92eed0e42e8650221b7ab8f20e2cad496b9315fb89

Contents?: true

Size: 900 Bytes

Versions: 10

Compression:

Stored size: 900 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

Version data entries

10 entries across 10 versions & 4 rubygems

Version Path
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/logging-1.8.2/test/config/test_yaml_configurator.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/logging-1.8.2/test/config/test_yaml_configurator.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/logging-1.8.2/test/config/test_yaml_configurator.rb
vagrant-tiktalik-0.0.3 vendor/bundle/ruby/2.0.0/gems/logging-1.8.1/test/config/test_yaml_configurator.rb
logging-1.8.2 test/config/test_yaml_configurator.rb
logging-1.8.1 test/config/test_yaml_configurator.rb
logging-1.8.0 test/config/test_yaml_configurator.rb
logging-1.7.2 test/config/test_yaml_configurator.rb
logging-1.7.1 test/config/test_yaml_configurator.rb
logging-1.7.0 test/config/test_yaml_configurator.rb