Sha256: b0bf4a67d32a798258273ab28677d589c0c6233cc69db97c6871342660d132bc

Contents?: true

Size: 635 Bytes

Versions: 33

Compression:

Stored size: 635 Bytes

Contents

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

class TestCoreExt < Test::Unit::TestCase
  context "A string" do
    it "should be converted to method name" do
      assert :this_is_fun, "this is fun".to_method_name
    end
    
    it "should be downcased when converted" do
      assert :this_is_a_blast, "THIS is A BlASt".to_method_name
    end
    
    it "should change spaces to _" do
      assert :this_has_been_great, "This has been great".to_method_name
    end

    it "should change dangerous punctuation to _" do
      assert :no__really__this_was__good_, "No, really; this was #good!".to_method_name
    end
  end
end

Version data entries

33 entries across 33 versions & 6 rubygems

Version Path
auser-poolparty-1.3.0 vendor/gems/context/test/test_core_ext.rb
auser-poolparty-1.3.1 vendor/gems/context/test/test_core_ext.rb
auser-poolparty-1.3.10 vendor/gems/context/test/test_core_ext.rb
auser-poolparty-1.3.11 vendor/gems/context/test/test_core_ext.rb
auser-poolparty-1.3.12 vendor/gems/context/test/test_core_ext.rb
auser-poolparty-1.3.13 vendor/gems/context/test/test_core_ext.rb
auser-poolparty-1.3.14 vendor/gems/context/test/test_core_ext.rb
auser-poolparty-1.3.15 vendor/gems/context/test/test_core_ext.rb
auser-poolparty-1.3.16 vendor/gems/context/test/test_core_ext.rb
auser-poolparty-1.3.17 vendor/gems/context/test/test_core_ext.rb
auser-poolparty-1.3.2 vendor/gems/context/test/test_core_ext.rb
auser-poolparty-1.3.3 vendor/gems/context/test/test_core_ext.rb
auser-poolparty-1.3.4 vendor/gems/context/test/test_core_ext.rb
auser-poolparty-1.3.5 vendor/gems/context/test/test_core_ext.rb
auser-poolparty-1.3.6 vendor/gems/context/test/test_core_ext.rb
auser-poolparty-1.3.7 vendor/gems/context/test/test_core_ext.rb
auser-poolparty-1.3.8 vendor/gems/context/test/test_core_ext.rb
djsun-context-0.5.5 test/test_core_ext.rb
fairchild-poolparty-1.3.17 vendor/gems/context/test/test_core_ext.rb
fairchild-poolparty-1.3.5 vendor/gems/context/test/test_core_ext.rb