Sha256: 141d5dbf9177861207b558750d8725cf76a860dbf0a5ebecf9f3c6b06886e030

Contents?: true

Size: 566 Bytes

Versions: 11

Compression:

Stored size: 566 Bytes

Contents

# encoding: utf-8

require 'helper'

class StringExtTest < Test::Unit::TestCase
  def test_html_decode
    assert_equal("a", "a".unhtml)
    assert_equal("รค", "&auml;".unhtml)
  end

  def test_sortkey
    assert_equal("actual", "actual".sortkey)
    assert_equal("schreck003012", "der schreck 3/12".sortkey)
  end

  def test_starts_ends_with
    s = "foo bar baz"
    assert s.starts_with?("foo")
    assert !s.starts_with?("baz")
    assert !s.ends_with?("foo")
    assert s.ends_with?("baz")

    assert s.starts_with?("")
    assert s.ends_with?("")
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
radiospieler-0.3.0 test/string_ext_test.rb
radiospiel-app-0.2.10 test/string_ext_test.rb
radiospiel-app-0.2.9 test/string_ext_test.rb
radiospiel-app-0.2.7 test/string_ext_test.rb
radiospiel-app-0.2.6 test/string_ext_test.rb
radiospiel-app-0.2.5 test/string_ext_test.rb
radiospiel-app-0.2.3 test/string_ext_test.rb
radiospiel-app-0.2.2 test/string_ext_test.rb
radiospiel-app-0.2.1 test/string_ext_test.rb
radiospiel-app-0.2.0 test/string_ext_test.rb
radiospiel-app-0.1.1 test/string_ext_test.rb