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.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb
index 92f57beb5f..e09eb02188 100644
--- a/activesupport/test/core_ext/string_ext_test.rb
+++ b/activesupport/test/core_ext/string_ext_test.rb
@@ -77,6 +77,12 @@ class StringInflectionsTest < Test::Unit::TestCase
assert_equal "o", s.last
assert_equal "llo", s.last(3)
+
+ assert_equal 'x', 'x'.first
+ assert_equal 'x', 'x'.first(4)
+
+ assert_equal 'x', 'x'.last
+ assert_equal 'x', 'x'.last(4)
end
def test_starts_ends_with