Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add spec testing Fixnum#ordinalize.

  • Loading branch information...
commit 66b514cf2d222ad1442d3bdfa0c5a05a14e752aa 1 parent df04165
@twe4ked authored
Showing with 17 additions and 0 deletions.
  1. +17 −0 spec/lib/fixnum_spec.rb
View
17 spec/lib/fixnum_spec.rb
@@ -0,0 +1,17 @@
+require_relative '../spec_helper'
+
+describe Fixnum do
+ describe 'ordinalize' do
+ [
+ [1, '1st'],
+ [2, '2nd'],
+ [3, '3rd'],
+ [4, '4th'],
+ [113, '113th']
+ ].each do |num, expected|
+ it "#{num} should be #{expected}" do
+ num.ordinalize.should == expected
+ end
+ end
+ end
+end

0 comments on commit 66b514c

Please sign in to comment.
Something went wrong with that request. Please try again.