Sha256: 88d726f143bf5ae7d24c55982e24d34f587d79846caff242446fbbcdc492153c

Contents?: true

Size: 547 Bytes

Versions: 28

Compression:

Stored size: 547 Bytes

Contents

require "#{File.dirname(__FILE__)}/../../test_helper"

class IntegerTest < Test::Unit::TestCase
  context "Integer" do
    should "have months defined" do
      # 60 seconds * 60 minutes * 24 hours * 30 days
      assert_equal 60*60*24*30, 1.months
      assert_equal 60*60*24*30*2, 2.months
      assert_equal 60*60*24*30*12, 12.months
    end
    
    should "have years set" do
      # 60 seconds * 60 minutes * 24 hours * 365.25 days
      assert_equal 60*60*24*365.25, 1.year
      assert_equal 60*60*24*365.25*2, 2.years
    end
  end
  
end

Version data entries

28 entries across 28 versions & 3 rubygems

Version Path
auser-poolparty-1.3.0 test/lib/core/integer_test.rb
auser-poolparty-1.3.1 test/lib/core/integer_test.rb
auser-poolparty-1.3.10 test/lib/core/integer_test.rb
auser-poolparty-1.3.11 test/lib/core/integer_test.rb
auser-poolparty-1.3.12 test/lib/core/integer_test.rb
auser-poolparty-1.3.13 test/lib/core/integer_test.rb
auser-poolparty-1.3.14 test/lib/core/integer_test.rb
auser-poolparty-1.3.15 test/lib/core/integer_test.rb
auser-poolparty-1.3.16 test/lib/core/integer_test.rb
auser-poolparty-1.3.17 test/lib/core/integer_test.rb
auser-poolparty-1.3.2 test/lib/core/integer_test.rb
auser-poolparty-1.3.3 test/lib/core/integer_test.rb
auser-poolparty-1.3.4 test/lib/core/integer_test.rb
auser-poolparty-1.3.5 test/lib/core/integer_test.rb
auser-poolparty-1.3.6 test/lib/core/integer_test.rb
auser-poolparty-1.3.7 test/lib/core/integer_test.rb
auser-poolparty-1.3.8 test/lib/core/integer_test.rb
fairchild-poolparty-1.3.17 test/lib/core/integer_test.rb
fairchild-poolparty-1.3.5 test/lib/core/integer_test.rb
poolparty-1.3.15 test/lib/core/integer_test.rb