diff options
-rw-r--r-- | activerecord/test/cases/base_test.rb | 8 | ||||
-rw-r--r-- | activerecord/test/cases/calculations_test.rb | 9 | ||||
-rw-r--r-- | activerecord/test/cases/dirty_test.rb | 5 | ||||
-rw-r--r-- | activerecord/test/models/numeric_data.rb | 3 |
4 files changed, 6 insertions, 19 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index fafa144c6f..4ab8118028 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -15,6 +15,7 @@ require "models/boolean" require "models/column_name" require "models/subscriber" require "models/comment" +require "models/numeric_data" require "models/minimalistic" require "models/warehouse_thing" require "models/parrot" @@ -908,13 +909,6 @@ class BasicsTest < ActiveRecord::TestCase end end - class NumericData < ActiveRecord::Base - self.table_name = "numeric_data" - - attribute :my_house_population, :integer - attribute :atoms_in_universe, :integer - end - def test_big_decimal_conditions m = NumericData.new( bank_balance: 1586.43, diff --git a/activerecord/test/cases/calculations_test.rb b/activerecord/test/cases/calculations_test.rb index db2871d383..7e7076196f 100644 --- a/activerecord/test/cases/calculations_test.rb +++ b/activerecord/test/cases/calculations_test.rb @@ -8,6 +8,7 @@ require "models/organization" require "models/possession" require "models/topic" require "models/reply" +require "models/numeric_data" require "models/minivan" require "models/speedometer" require "models/ship_part" @@ -17,14 +18,6 @@ require "models/comment" require "models/rating" require "models/post" -class NumericData < ActiveRecord::Base - self.table_name = "numeric_data" - - attribute :world_population, :integer - attribute :my_house_population, :integer - attribute :atoms_in_universe, :integer -end - class CalculationsTest < ActiveRecord::TestCase fixtures :companies, :accounts, :topics, :speedometers, :minivans, :books diff --git a/activerecord/test/cases/dirty_test.rb b/activerecord/test/cases/dirty_test.rb index 09bd00291d..eee34da664 100644 --- a/activerecord/test/cases/dirty_test.rb +++ b/activerecord/test/cases/dirty_test.rb @@ -4,10 +4,7 @@ require "models/pirate" # For timestamps require "models/parrot" require "models/person" # For optimistic locking require "models/aircraft" - -class NumericData < ActiveRecord::Base - self.table_name = "numeric_data" -end +require "models/numeric_data" class DirtyTest < ActiveRecord::TestCase include InTimeZone diff --git a/activerecord/test/models/numeric_data.rb b/activerecord/test/models/numeric_data.rb new file mode 100644 index 0000000000..9d2fe9781d --- /dev/null +++ b/activerecord/test/models/numeric_data.rb @@ -0,0 +1,3 @@ +class NumericData < ActiveRecord::Base + self.table_name = "numeric_data" +end |