From dba6b8b46f93ed0116755bea17cfbce7ca6d7c72 Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Mon, 18 Jul 2005 02:16:17 +0000 Subject: Add ordinalize to Fixnum and Bignum instances git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1855 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/test/core_ext/fixnum_ext_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'activesupport/test/core_ext/fixnum_ext_test.rb') diff --git a/activesupport/test/core_ext/fixnum_ext_test.rb b/activesupport/test/core_ext/fixnum_ext_test.rb index 7ffc32a9e1..66297fc378 100644 --- a/activesupport/test/core_ext/fixnum_ext_test.rb +++ b/activesupport/test/core_ext/fixnum_ext_test.rb @@ -26,4 +26,11 @@ class FixnumExtTest < Test::Unit::TestCase assert !22953686867719691230002707821868552601124472329079.multiple_of?(5) assert !22953686867719691230002707821868552601124472329079.multiple_of?(7) end + + def test_ordinalize + # These tests are mostly just to ensure that the ordinalize method exists + # It's results are tested comprehensively in the inflector test cases. + assert_equal '1st', 1.ordinalize + assert_equal '8th', 8.ordinalize + end end -- cgit v1.2.3