Sha256: 9e72f2be4c1821dcadbfbe061fdf6754ce10724751d58b27824966e9f7fa204b

Contents?: true

Size: 855 Bytes

Versions: 10

Compression:

Stored size: 855 Bytes

Contents

require 'minitest/autorun'
require File.dirname(__FILE__) + '/../lib/yawast'
require File.dirname(__FILE__) + '/base'
require 'colorize'

class TestSharedUtils < Minitest::Test
  include TestBase

  def test_puts_error
    override_stdout

    Yawast::Utilities.puts_error 'test'
    assert_equal stdout_value, '[E]'.red + " test\n"

    restore_stdout
  end

  def test_puts_vuln
    override_stdout

    Yawast::Utilities.puts_vuln 'test'
    assert_equal stdout_value, '[V]'.magenta + " test\n"

    restore_stdout
  end

  def test_puts_warn
    override_stdout

    Yawast::Utilities.puts_warn 'test'
    assert_equal stdout_value, '[W]'.yellow + " test\n"

    restore_stdout
  end

  def test_puts_info
    override_stdout

    Yawast::Utilities.puts_info 'test'
    assert_equal stdout_value, '[I]'.green + " test\n"

    restore_stdout
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
yawast-0.4.0.beta4 test/test_shared_util.rb
yawast-0.4.0.beta3 test/test_shared_util.rb
yawast-0.4.0.beta2 test/test_shared_util.rb
yawast-0.4.0.beta1 test/test_shared_util.rb
yawast-0.3.0 test/test_shared_util.rb
yawast-0.3.0.beta2 test/test_shared_util.rb
yawast-0.3.0.beta1 test/test_shared_util.rb
yawast-0.2.2 test/test_shared_util.rb
yawast-0.2.1 test/test_shared_util.rb
yawast-0.2.0.beta3 test/test_shared_util.rb