Sha256: 376762232179d7e64cc443fc4e585731ae3e71c2f918d579372de66d170052d7

Contents?: true

Size: 465 Bytes

Versions: 4

Compression:

Stored size: 465 Bytes

Contents

require '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

4 entries across 4 versions & 1 rubygems

Version Path
sprout-1.0.35.pre test/unit/string_test.rb
sprout-1.0.32.pre test/unit/string_test.rb
sprout-1.0.31.pre test/unit/string_test.rb
sprout-1.0.29.pre test/unit/string_test.rb