Sha256: 3aa341dcbf8b8c46e3c0eb6416cae6a16b768e766e5afedd88d3f4d8e29949de

Contents?: true

Size: 1.38 KB

Versions: 6

Compression:

Stored size: 1.38 KB

Contents

# Copyright (C) 2013  Kouhei Sutou <kou@clear-code.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

require "grntest/executors/base-executor"

class TestBaseExecutor < Test::Unit::TestCase
  def setup
    @executor = Grntest::Executors::BaseExecutor.new
    @context = @executor.context
  end

  class TestErrorLog < self
    data("emergency" => "E",
         "alert"     => "A",
         "critical"  => "C",
         "error"     => "e",
         "warning"   => "w")
    def test_important_log_level(level)
      assert_true(@executor.send(:important_log_level?, level))
    end

    data("notice"  => "n",
         "info"    => "i",
         "debug"   => "d",
         "dump"    => "-")
    def test_not_important_log_level(level)
      assert_false(@executor.send(:important_log_level?, level))
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
grntest-1.0.8 test/executors/test-base-executor.rb
grntest-1.0.7 test/executors/test-base-executor.rb
grntest-1.0.6 test/executors/test-base-executor.rb
grntest-1.0.5 test/executors/test-base-executor.rb
grntest-1.0.4 test/executors/test-base-executor.rb
grntest-1.0.3 test/executors/test-base-executor.rb