Sha256: 5484424e683c884a967276dcf13e3659f5e16e85ad9bd7807beebf5fcb57822d

Contents?: true

Size: 554 Bytes

Versions: 14

Compression:

Stored size: 554 Bytes

Contents

PRIME = 22953686867719691230002707821868552601124472329079

describe "Integer" do
  describe "multiple_of" do
    it "should determine if an integer is a multiple of another" do
      [ -7, 0, 7, 14 ].each { |i| i.should.be.multiple_of 7 }
      [ -7, 7, 14 ].each { |i| i.should.not.be.multiple_of 6 }
    end
    
    it "should work with edge cases" do
      0.should.be.multiple_of 0
      5.should.not.be.multiple_of 0
    end

    it "should work with a prime" do
      [2, 3, 5, 7].each { |i| PRIME.should.not.be.multiple_of i }
    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/multiple_spec.rb
motion-support-1.1.1 spec/motion-support/core_ext/integer/multiple_spec.rb
motion-support-1.2.0 spec/motion-support/core_ext/integer/multiple_spec.rb
motion-support-1.1.0 spec/motion-support/core_ext/integer/multiple_spec.rb
motion-support-1.0.0 spec/motion-support/core_ext/integer/multiple_spec.rb
motion-support-0.3.0 spec/motion-support/core_ext/integer/multiple_spec.rb
motion_blender-support-0.2.8 spec/motion-support/core_ext/integer/multiple_spec.rb
motion_blender-support-0.2.7 spec/motion-support/core_ext/integer/multiple_spec.rb
motion-support-0.2.6 spec/motion-support/core_ext/integer/multiple_spec.rb
motion-support-0.2.5 spec/motion-support/core_ext/integer/multiple_spec.rb
motion-support-0.2.4 spec/motion-support/core_ext/integer/multiple_spec.rb
motion-support-0.2.3 spec/motion-support/core_ext/integer/multiple_spec.rb
motion-support-0.2.2 spec/motion-support/core_ext/integer/multiple_spec.rb
motion-support-0.2.0 spec/motion-support/core_ext/integer/multiple_spec.rb