Sha256: f670f2d857d3a3589ba42ef0a300b5c42990d346bad4844a38b00fde6bd8ac48

Contents?: true

Size: 828 Bytes

Versions: 27

Compression:

Stored size: 828 Bytes

Contents

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

27 entries across 27 versions & 1 rubygems

Version Path
yawast-0.7.2 test/test_shared_util.rb
yawast-0.7.1 test/test_shared_util.rb
yawast-0.7.0 test/test_shared_util.rb
yawast-0.7.0.beta3 test/test_shared_util.rb
yawast-0.7.0.beta2 test/test_shared_util.rb
yawast-0.7.0.beta1 test/test_shared_util.rb
yawast-0.6.0 test/test_shared_util.rb
yawast-0.6.0.beta6 test/test_shared_util.rb
yawast-0.6.0.beta5 test/test_shared_util.rb
yawast-0.6.0.beta4 test/test_shared_util.rb
yawast-0.6.0.beta3 test/test_shared_util.rb
yawast-0.6.0.beta2 test/test_shared_util.rb
yawast-0.6.0.beta1 test/test_shared_util.rb
yawast-0.5.2 test/test_shared_util.rb
yawast-0.5.1 test/test_shared_util.rb
yawast-0.5.1.beta1 test/test_shared_util.rb
yawast-0.5.0 test/test_shared_util.rb
yawast-0.5.0.beta8 test/test_shared_util.rb
yawast-0.5.0.beta7 test/test_shared_util.rb
yawast-0.5.0.beta6 test/test_shared_util.rb