Sha256: bbab9995188fa20bf0eaca285efa16b5d5634259ac3017e24ac915f27f637de4

Contents?: true

Size: 1.06 KB

Versions: 6

Compression:

Stored size: 1.06 KB

Contents

# Author::    Nicolas Desprès  <nicolas.despres@lrde.epita.fr>.
# Copyright:: Copyright (c) 2005 Uttk Team. All rights reserved.
# License::   LGPL
# $Id: /w/fey/uttk/trunk/test/unit/logger/verbosity_test.rb 21975 2006-02-19T22:24:11.182512Z pouillar  $


test_section __FILE__ do

module Uttk

  class Logger

    class VerbosityTest < ::Test::Unit::TestCase

      class VerbosityEx < Verbosity
      end

      def test_self_verbosity
        assert_raises(ArgumentError) do
          VerbosityEx.verbosity :foo, 42
        end
        assert_raises(ArgumentError) do
          VerbosityEx.verbosity :sections, 0
        end
      end

      def test_self_level_fields
        assert_equal([], Verbosity.level_fields(0))
        assert_equal([:severity_level], Verbosity.level_fields(1))
        assert_equal([:sections], Verbosity.level_fields(2))
        assert_equal([:date], Verbosity.level_fields(3))
      end

      def test_higher_level
        assert_equal(3, VerbosityEx.higher_level)
      end

    end # class VerbosityTest

  end # class Logger

end # module Uttk

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
uttk-0.3.6.1 test/unit/logger/verbosity_test.rb
uttk-0.3.1.2 test/unit/logger/verbosity_test.rb
uttk-0.3.5.0 test/unit/logger/verbosity_test.rb
uttk-0.4.6.2 test/unit/logger/verbosity_test.rb
uttk-0.4.5.0 test/unit/logger/verbosity_test.rb
uttk-0.4.6.1 test/unit/logger/verbosity_test.rb