Sha256: 21590588b1e4185e203091a2a6f64880569f920e34c402cbbe02c63f1f36d8ac

Contents?: true

Size: 747 Bytes

Versions: 4

Compression:

Stored size: 747 Bytes

Contents

require 'helper'

class TestFavstar < Test::Unit::TestCase

  def setup
    global_setup
    @favstar = Stars::Favstar.new
  end

  def test_parse_title
    title = "6 stars: Zach Holman is attractive and handsome."
    parsed_title = @favstar.parse_title(title)
    assert_equal "Zach Holman is attractive and handsome.", parsed_title
  end

  def test_parse_title_with_colons
    title = "6 stars: Zach Holman is: attractive and handsome."
    parsed_title = @favstar.parse_title(title)
    assert_equal "Zach Holman is: attractive and handsome.", parsed_title
  end

  def test_parse_stars
    title = "6 stars: Zach Holman is attractive and handsome."
    parsed_stars = @favstar.parse_stars(title)
    assert_equal 6, parsed_stars
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
stars-0.5.3 test/test_favstar.rb
stars-0.5.2 test/test_favstar.rb
stars-0.5.1 test/test_favstar.rb
stars-0.5.0 test/test_favstar.rb