Sha256: 0f03ec728da43fd770501abd97fde7d2cdeb53b47bb2c8441db92d23314650ad

Contents?: true

Size: 491 Bytes

Versions: 22

Compression:

Stored size: 491 Bytes

Contents

require File.dirname(__FILE__) + '/test_helper'

class StringTest < Test::Unit::TestCase
  include SproutTestCase

  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

22 entries across 22 versions & 1 rubygems

Version Path
sprout-1.0.26.pre test/unit/string_test.rb
sprout-1.0.25.pre test/unit/string_test.rb
sprout-1.0.24.pre test/unit/string_test.rb
sprout-1.0.23.pre test/unit/string_test.rb
sprout-1.0.22.pre test/unit/string_test.rb
sprout-1.0.20.pre test/unit/string_test.rb
sprout-1.0.19.pre test/unit/string_test.rb
sprout-1.0.18.pre test/unit/string_test.rb
sprout-1.0.17.pre test/unit/string_test.rb
sprout-1.0.16.pre test/unit/string_test.rb
sprout-1.0.15.pre test/unit/string_test.rb
sprout-1.0.14.pre test/unit/string_test.rb
sprout-1.0.13.pre test/unit/string_test.rb
sprout-1.0.11.pre test/unit/string_test.rb
sprout-1.0.9.pre test/unit/string_test.rb
sprout-1.0.8.pre test/unit/string_test.rb
sprout-1.0.5.pre test/unit/string_test.rb
sprout-1.0.4.pre test/unit/string_test.rb
sprout-1.0.3.pre test/unit/string_test.rb
sprout-1.0.2.pre test/unit/string_test.rb