diff options
author | Jeffrey Hardy <packagethief@gmail.com> | 2009-08-26 12:10:42 -0400 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-08-26 14:46:38 -0700 |
commit | 66d8063c910b166e58f77ca5149a454f721667c7 (patch) | |
tree | eb2d8cfddd7312f4f441ca4e14aa81b645ec9960 /activesupport/test | |
parent | 05b529ca57f75ce64540b9d34597e0c3bfe1fca7 (diff) | |
download | rails-66d8063c910b166e58f77ca5149a454f721667c7.tar.gz rails-66d8063c910b166e58f77ca5149a454f721667c7.tar.bz2 rails-66d8063c910b166e58f77ca5149a454f721667c7.zip |
Correct Regexp#un/optionalize assertions and fix uncovered failures
[#3102 state:incomplete]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/regexp_ext_test.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activesupport/test/core_ext/regexp_ext_test.rb b/activesupport/test/core_ext/regexp_ext_test.rb index f71099856d..be06a597a8 100644 --- a/activesupport/test/core_ext/regexp_ext_test.rb +++ b/activesupport/test/core_ext/regexp_ext_test.rb @@ -13,14 +13,14 @@ class RegexpExtAccessTests < Test::Unit::TestCase end def test_optionalize - assert "a?", Regexp.optionalize("a") - assert "(?:foo)?", Regexp.optionalize("foo") - assert "", Regexp.optionalize("") + assert_equal "a?", Regexp.optionalize("a") + assert_equal "(?:foo)?", Regexp.optionalize("foo") + assert_equal "", Regexp.optionalize("") end def test_unoptionalize - assert "a", Regexp.unoptionalize("a?") - assert "foo", Regexp.unoptionalize("(?:foo)") - assert "", Regexp.unoptionalize("") + assert_equal "a", Regexp.unoptionalize("a?") + assert_equal "foo", Regexp.unoptionalize("(?:foo)?") + assert_equal "", Regexp.unoptionalize("") end end
\ No newline at end of file |