Sha256: 7b25d274cbb19a365ad5210a7bdceb294860a464b8e21baa39ff67800d71aff7

Contents?: true

Size: 1.44 KB

Versions: 22

Compression:

Stored size: 1.44 KB

Contents

# Copyright (C) 2013-2014  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
    @context = Grntest::ExecutionContext.new
    @executor = Grntest::Executors::BaseExecutor.new(@context)
  end

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

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

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
grntest-1.1.3 test/executors/test-base-executor.rb
grntest-1.1.2 test/executors/test-base-executor.rb