Sha256: e62b352944015b1a64efc023144818e7b95e08192817b330db6817f895f2a9ce

Contents?: true

Size: 469 Bytes

Versions: 13

Compression:

Stored size: 469 Bytes

Contents

require 'test_helper'

class StringTest < Test::Unit::TestCase
  include Sprout::TestHelper

  context "a new string" do

    should "switch to snake case" do
      assert_equal "a_b_c", "ABC".snake_case
      assert_equal "my_big_camel_case_word", "MyBigCamelCaseWord".snake_case
    end

    should "switch to camel case" do
      assert_equal "ABC", "a_b_c".camel_case
      assert_equal "MyBigCamelCaseWord", "my_big_camel_case_word".camel_case
    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
sprout-1.1.18.pre test/unit/string_test.rb
sprout-1.1.17.pre test/unit/string_test.rb
sprout-1.1.16.pre test/unit/string_test.rb
sprout-1.1.15.pre test/unit/string_test.rb
sprout-1.1.14.pre test/unit/string_test.rb
sprout-1.1.13.pre test/unit/string_test.rb
sprout-1.1.11.pre test/unit/string_test.rb
sprout-1.1.10.pre test/unit/string_test.rb
sprout-1.1.7.pre test/unit/string_test.rb
sprout-1.1.5.pre test/unit/string_test.rb
sprout-1.1.4.pre test/unit/string_test.rb
sprout-1.1.3.pre test/unit/string_test.rb
sprout-1.1.2.pre test/unit/string_test.rb