mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix models load order to be able to run unit tests.
[#2550 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
parent
3c4c6bd0df
commit
a841cd2503
4 changed files with 13 additions and 13 deletions
|
@ -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 @@ class EagerLoadNestedIncludeWithMissingDataTest < ActiveRecord::TestCase
|
|||
Author.all :include => includes, :conditions => {:authors => {:name => @davey_mcdave.name}}, :order => 'categories.name'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -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/auto_id'
|
|||
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 @@ class BasicsTest < ActiveRecord::TestCase
|
|||
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 @@ class BasicsTest < ActiveRecord::TestCase
|
|||
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
|
||||
|
|
|
@ -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/topic'
|
|||
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 @@ class FinderTest < ActiveRecord::TestCase
|
|||
|
||||
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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue