aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/string_ext_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/core_ext/string_ext_test.rb')
-rw-r--r--activesupport/test/core_ext/string_ext_test.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb
index 722bb24a37..cec6772272 100644
--- a/activesupport/test/core_ext/string_ext_test.rb
+++ b/activesupport/test/core_ext/string_ext_test.rb
@@ -143,15 +143,23 @@ class StringInflectionsTest < Test::Unit::TestCase
assert_equal %w(hello), hash.keys
end
- def test_starts_ends_with
+ def test_starts_ends_with_alias
s = "hello"
assert s.starts_with?('h')
assert s.starts_with?('hel')
assert !s.starts_with?('el')
+ assert s.start_with?('h')
+ assert s.start_with?('hel')
+ assert !s.start_with?('el')
+
assert s.ends_with?('o')
assert s.ends_with?('lo')
assert !s.ends_with?('el')
+
+ assert s.end_with?('o')
+ assert s.end_with?('lo')
+ assert !s.end_with?('el')
end
# FIXME: Ruby 1.9