diff options
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/regexp_ext_test.rb | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/activesupport/test/core_ext/regexp_ext_test.rb b/activesupport/test/core_ext/regexp_ext_test.rb index cc3f07d5c5..68b089d5b4 100644 --- a/activesupport/test/core_ext/regexp_ext_test.rb +++ b/activesupport/test/core_ext/regexp_ext_test.rb @@ -2,28 +2,9 @@ require 'abstract_unit' require 'active_support/core_ext/regexp' class RegexpExtAccessTests < Test::Unit::TestCase - def test_number_of_captures - assert_equal 0, //.number_of_captures - assert_equal 1, /.(.)./.number_of_captures - assert_equal 2, /.(.).(?:.).(.)/.number_of_captures - assert_equal 3, /.((.).(?:.).(.))/.number_of_captures - end - def test_multiline assert_equal true, //m.multiline? assert_equal false, //.multiline? assert_equal false, /(?m:)/.multiline? end - - def test_optionalize - assert_equal "a?", Regexp.optionalize("a") - assert_equal "(?:foo)?", Regexp.optionalize("foo") - assert_equal "", Regexp.optionalize("") - end - - def test_unoptionalize - assert_equal "a", Regexp.unoptionalize("a?") - assert_equal "foo", Regexp.unoptionalize("(?:foo)?") - assert_equal "", Regexp.unoptionalize("") - end end |