aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/numeric_data_test.rb
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2018-03-03 21:25:29 +0200
committerbogdanvlviv <bogdanvlviv@gmail.com>2018-03-04 20:44:30 +0200
commitce03e7d991a703c8d2e9c721902f312ccaeb5123 (patch)
tree7dc7371fb868b6bcea6e2d0ec4fb252920363839 /activerecord/test/cases/numeric_data_test.rb
parent7d5a7b30cc79d91f3e3fa8ee81a077276947eb72 (diff)
downloadrails-ce03e7d991a703c8d2e9c721902f312ccaeb5123.tar.gz
rails-ce03e7d991a703c8d2e9c721902f312ccaeb5123.tar.bz2
rails-ce03e7d991a703c8d2e9c721902f312ccaeb5123.zip
Fix occurrences Fixnum|Bignum
Related to https://github.com/rails/rails/commit/d4eb0dc89ee6b476e2e10869dc282a96f956c6c7#r27830891
Diffstat (limited to 'activerecord/test/cases/numeric_data_test.rb')
-rw-r--r--activerecord/test/cases/numeric_data_test.rb14
1 files changed, 4 insertions, 10 deletions
diff --git a/activerecord/test/cases/numeric_data_test.rb b/activerecord/test/cases/numeric_data_test.rb
index f917c8f727..14db63890e 100644
--- a/activerecord/test/cases/numeric_data_test.rb
+++ b/activerecord/test/cases/numeric_data_test.rb
@@ -19,7 +19,7 @@ class NumericDataTest < ActiveRecord::TestCase
m = NumericData.new(
bank_balance: 1586.43,
big_bank_balance: BigDecimal("1000234000567.95"),
- world_population: 6000000000,
+ world_population: 2**62,
my_house_population: 3
)
assert m.save
@@ -27,11 +27,8 @@ class NumericDataTest < ActiveRecord::TestCase
m1 = NumericData.find(m.id)
assert_not_nil m1
- # As with migration_test.rb, we should make world_population >= 2**62
- # to cover 64-bit platforms and test it is a Bignum, but the main thing
- # is that it's an Integer.
assert_kind_of Integer, m1.world_population
- assert_equal 6000000000, m1.world_population
+ assert_equal 2**62, m1.world_population
assert_kind_of Integer, m1.my_house_population
assert_equal 3, m1.my_house_population
@@ -47,7 +44,7 @@ class NumericDataTest < ActiveRecord::TestCase
m = NumericData.new(
bank_balance: 1586.43122334,
big_bank_balance: BigDecimal("234000567.952344"),
- world_population: 6000000000,
+ world_population: 2**62,
my_house_population: 3
)
assert m.save
@@ -55,11 +52,8 @@ class NumericDataTest < ActiveRecord::TestCase
m1 = NumericData.find(m.id)
assert_not_nil m1
- # As with migration_test.rb, we should make world_population >= 2**62
- # to cover 64-bit platforms and test it is a Bignum, but the main thing
- # is that it's an Integer.
assert_kind_of Integer, m1.world_population
- assert_equal 6000000000, m1.world_population
+ assert_equal 2**62, m1.world_population
assert_kind_of Integer, m1.my_house_population
assert_equal 3, m1.my_house_population