Sha256: 35dc94dc3d0c52eb24262f639a1dc0d593e8258bb2f33464aea6c3b784871b68

Contents?: true

Size: 426 Bytes

Versions: 6

Compression:

Stored size: 426 Bytes

Contents

require 'test_helper'

# Tests the BrowserCMS extentions to the String class
class StringTest < ActiveSupport::TestCase

  test "string should be pluralizes unless there is one" do
    assert_equal "posts", "post".pluralize_unless_one(0)
    assert_equal "posts", "post".pluralize_unless_one(2)
  end

  test "string shouldn't be pluralized if there is one" do
    assert_equal "post", "post".pluralize_unless_one(1)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
browsercms-3.4.2 test/unit/extensions/string_test.rb
browsercms-3.4.2.rc1 test/unit/extensions/string_test.rb
browsercms-3.4.1 test/unit/extensions/string_test.rb
browsercms-3.4.0 test/unit/extensions/string_test.rb
browsercms-3.4.0.rc2 test/unit/extensions/string_test.rb
browsercms-3.4.0.rc1 test/unit/extensions/string_test.rb