Sha256: 4b06aef6fee22555648abcd5dce7f27354e97a767e8b0d901a0b3c23ff62ea50

Contents?: true

Size: 545 Bytes

Versions: 14

Compression:

Stored size: 545 Bytes

Contents

# These tests are mostly just to ensure that the ordinalize method exists.
# Its results are tested comprehensively in the inflector test cases.
describe "Integer" do
  describe "ordinalize" do
    it "should ordinalize 1" do
      1.ordinalize.should == '1st'
    end
    
    it "should ordinalize 8" do
      8.ordinalize.should == '8th'
    end
  end

  describe "ordinal" do
    it "should get ordinal of 1" do
      1.ordinal.should == 'st'
    end
    
    it "should get ordinal of 8" do
      8.ordinal.should == 'th'
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
motion-support-1.2.1 spec/motion-support/core_ext/integer/inflection_spec.rb
motion-support-1.1.1 spec/motion-support/core_ext/integer/inflection_spec.rb
motion-support-1.2.0 spec/motion-support/core_ext/integer/inflection_spec.rb
motion-support-1.1.0 spec/motion-support/core_ext/integer/inflection_spec.rb
motion-support-1.0.0 spec/motion-support/core_ext/integer/inflection_spec.rb
motion-support-0.3.0 spec/motion-support/core_ext/integer/inflection_spec.rb
motion_blender-support-0.2.8 spec/motion-support/core_ext/integer/inflection_spec.rb
motion_blender-support-0.2.7 spec/motion-support/core_ext/integer/inflection_spec.rb
motion-support-0.2.6 spec/motion-support/core_ext/integer/inflection_spec.rb
motion-support-0.2.5 spec/motion-support/core_ext/integer/inflection_spec.rb
motion-support-0.2.4 spec/motion-support/core_ext/integer/inflection_spec.rb
motion-support-0.2.3 spec/motion-support/core_ext/integer/inflection_spec.rb
motion-support-0.2.2 spec/motion-support/core_ext/integer/inflection_spec.rb
motion-support-0.2.0 spec/motion-support/core_ext/integer/inflection_spec.rb