Permalink
Browse files

Fix models load order to be able to run unit tests.

[#2550 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
1 parent 3c4c6bd commit a841cd2503e26d4af908b2ff49592973eabcac46 @miloops miloops committed with jeremy Apr 23, 2009
View
10 activerecord/test/cases/associations/eager_load_nested_include_test.rb
@@ -1,6 +1,6 @@
require 'cases/helper'
-require 'models/author'
require 'models/post'
+require 'models/author'
require 'models/comment'
require 'models/category'
require 'models/categorization'
@@ -66,13 +66,13 @@ class EagerLoadPolyAssocsTest < ActiveRecord::TestCase
def setup
generate_test_object_graphs
end
-
+
def teardown
- [Circle, Square, Triangle, PaintColor, PaintTexture,
+ [Circle, Square, Triangle, PaintColor, PaintTexture,
ShapeExpression, NonPolyOne, NonPolyTwo].each do |c|
c.delete_all
end
-
+
end
@@ -127,4 +127,4 @@ def test_missing_data_in_a_nested_include_should_not_cause_errors_when_construct
Author.all :include => includes, :conditions => {:authors => {:name => @davey_mcdave.name}}, :order => 'categories.name'
end
end
-end
+end
View
6 activerecord/test/cases/base_test.rb
@@ -1,4 +1,5 @@
require "cases/helper"
+require 'models/post'
require 'models/author'
require 'models/topic'
require 'models/reply'
@@ -12,7 +13,6 @@
require 'models/column_name'
require 'models/subscriber'
require 'models/keyboard'
-require 'models/post'
require 'models/comment'
require 'models/minimalistic'
require 'models/warehouse_thing'
@@ -1115,7 +1115,7 @@ def test_multiparameter_attributes_on_time_with_skip_time_zone_conversion_for_at
Time.zone = nil
Topic.skip_time_zone_conversion_for_attributes = []
end
-
+
def test_multiparameter_attributes_on_time_only_column_with_time_zone_aware_attributes_does_not_do_time_zone_conversion
ActiveRecord::Base.time_zone_aware_attributes = true
ActiveRecord::Base.default_timezone = :utc
@@ -1439,7 +1439,7 @@ def test_serialized_time_attribute
topic = Topic.create("content" => myobj).reload
assert_equal(myobj, topic.content)
end
-
+
def test_serialized_string_attribute
myobj = "Yes"
topic = Topic.create("content" => myobj).reload
View
8 activerecord/test/cases/finder_test.rb
@@ -1,4 +1,5 @@
require "cases/helper"
+require 'models/post'
require 'models/author'
require 'models/categorization'
require 'models/comment'
@@ -7,7 +8,6 @@
require 'models/reply'
require 'models/entrant'
require 'models/developer'
-require 'models/post'
require 'models/customer'
require 'models/job'
require 'models/categorization'
@@ -94,16 +94,16 @@ def test_exists
assert_raise(NoMethodError) { Topic.exists?([1,2]) }
end
-
+
def test_exists_returns_true_with_one_record_and_no_args
assert Topic.exists?
end
-
+
def test_does_not_exist_with_empty_table_and_no_args_given
Topic.delete_all
assert !Topic.exists?
end
-
+
def test_exists_with_aggregate_having_three_mappings
existing_address = customers(:david).address
assert Customer.exists?(:address => existing_address)
View
2 activerecord/test/cases/method_scoping_test.rb
@@ -1,9 +1,9 @@
require "cases/helper"
+require 'models/post'
require 'models/author'
require 'models/developer'
require 'models/project'
require 'models/comment'
-require 'models/post'
require 'models/category'
class MethodScopingTest < ActiveRecord::TestCase

0 comments on commit a841cd2

Please sign in to comment.