Sha256: 57e2b2384ddcc34b462db646c5e932d33a7373567a76bdfc952f522193d703d6

Contents?: true

Size: 739 Bytes

Versions: 2

Compression:

Stored size: 739 Bytes

Contents

require 'helper'

class TestItem < Test::Unit::TestCase

  def setup
    @item = Boom::Item.new('github','https://github.com')
  end

  def test_name
    assert_equal 'github', @item.name
  end

  def test_value
    assert_equal 'https://github.com', @item.value
  end

  def test_short_name
    assert_equal 'github', @item.short_name
  end

  def test_short_name
    @item.name = 'github github github lol lol lol'
    assert_equal 'github github g…', @item.short_name
  end

  def test_spacer_none
    @item.name = 'github github github lol lol lol'
    assert_equal '', @item.spacer
  end

  def test_spacer_tons
    assert_equal '          ', @item.spacer
  end

  def test_to_hash
    assert_equal 1, @item.to_hash.size
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
boom-0.0.7 test/test_item.rb
boom-0.0.6 test/test_item.rb