aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/aaa_create_tables_test.rb6
-rw-r--r--activerecord/test/cases/adapter_test.rb4
-rw-r--r--activerecord/test/cases/adapter_test_sqlserver.rb6
-rw-r--r--activerecord/test/cases/associations/inner_join_association_test.rb10
-rw-r--r--activerecord/test/cases/associations/join_model_test.rb24
-rwxr-xr-xactiverecord/test/cases/associations_test.rb34
-rwxr-xr-xactiverecord/test/cases/attribute_methods_test.rb2
-rwxr-xr-xactiverecord/test/cases/base_test.rb28
-rw-r--r--activerecord/test/cases/binary_test.rb4
-rw-r--r--activerecord/test/cases/calculations_test.rb4
-rw-r--r--activerecord/test/cases/column_alias_test.rb2
-rw-r--r--activerecord/test/cases/connection_test_firebird.rb2
-rw-r--r--activerecord/test/cases/connection_test_mysql.rb2
-rw-r--r--activerecord/test/cases/date_time_test.rb4
-rw-r--r--activerecord/test/cases/default_test_firebird.rb2
-rw-r--r--activerecord/test/cases/defaults_test.rb4
-rwxr-xr-xactiverecord/test/cases/deprecated_finder_test.rb2
-rw-r--r--activerecord/test/cases/finder_test.rb16
-rwxr-xr-xactiverecord/test/cases/fixtures_test.rb46
-rwxr-xr-xactiverecord/test/cases/inheritance_test.rb6
-rw-r--r--activerecord/test/cases/json_serialization_test.rb12
-rwxr-xr-xactiverecord/test/cases/lifecycle_test.rb6
-rw-r--r--activerecord/test/cases/locking_test.rb6
-rw-r--r--activerecord/test/cases/method_scoping_test.rb10
-rw-r--r--activerecord/test/cases/migration_test.rb54
-rw-r--r--activerecord/test/cases/migration_test_firebird.rb2
-rw-r--r--activerecord/test/cases/modules_test.rb2
-rw-r--r--activerecord/test/cases/multiple_db_test.rb6
-rw-r--r--activerecord/test/cases/pk_test.rb14
-rw-r--r--activerecord/test/cases/query_cache_test.rb12
-rwxr-xr-xactiverecord/test/cases/readonly_test.rb12
-rw-r--r--activerecord/test/cases/reflection_test.rb10
-rw-r--r--activerecord/test/cases/reserved_word_test_mysql.rb2
-rw-r--r--activerecord/test/cases/schema_dumper_test.rb2
-rw-r--r--activerecord/test/cases/serialization_test.rb4
-rw-r--r--activerecord/test/cases/synonym_test_oracle.rb4
-rw-r--r--activerecord/test/cases/table_name_test_sqlserver.rb2
-rw-r--r--activerecord/test/cases/threaded_connections_test.rb4
-rw-r--r--activerecord/test/cases/transactions_test.rb6
-rwxr-xr-xactiverecord/test/cases/validations_test.rb10
-rw-r--r--activerecord/test/cases/xml_serialization_test.rb12
41 files changed, 200 insertions, 200 deletions
diff --git a/activerecord/test/cases/aaa_create_tables_test.rb b/activerecord/test/cases/aaa_create_tables_test.rb
index 56c9cabac1..f1fae8a469 100644
--- a/activerecord/test/cases/aaa_create_tables_test.rb
+++ b/activerecord/test/cases/aaa_create_tables_test.rb
@@ -5,7 +5,7 @@ class AAACreateTablesTest < ActiveSupport::TestCase
self.use_transactional_fixtures = false
def setup
- @base_path = "#{File.dirname(__FILE__)}/fixtures/db_definitions"
+ @base_path = "#{File.dirname(__FILE__)}/../schema"
end
def test_drop_and_create_main_tables
@@ -15,7 +15,7 @@ class AAACreateTablesTest < ActiveSupport::TestCase
def test_load_schema
if ActiveRecord::Base.connection.supports_migrations?
- eval(File.read("#{File.dirname(__FILE__)}/fixtures/db_definitions/schema.rb"))
+ eval(File.read("#{File.dirname(__FILE__)}/../schema/schema.rb"))
else
recreate ActiveRecord::Base, '3'
end
@@ -24,7 +24,7 @@ class AAACreateTablesTest < ActiveSupport::TestCase
def test_drop_and_create_courses_table
if Course.connection.supports_migrations?
- eval(File.read("#{File.dirname(__FILE__)}/fixtures/db_definitions/schema2.rb"))
+ eval(File.read("#{File.dirname(__FILE__)}/../schema/schema2.rb"))
end
recreate Course, '2' unless use_migrations_for_courses?
assert true
diff --git a/activerecord/test/cases/adapter_test.rb b/activerecord/test/cases/adapter_test.rb
index d93a99d7cd..d5993d044a 100644
--- a/activerecord/test/cases/adapter_test.rb
+++ b/activerecord/test/cases/adapter_test.rb
@@ -83,8 +83,8 @@ class AdapterTest < ActiveSupport::TestCase
# test resetting sequences in odd tables in postgreSQL
if ActiveRecord::Base.connection.respond_to?(:reset_pk_sequence!)
- require 'fixtures/movie'
- require 'fixtures/subscriber'
+ require 'models/movie'
+ require 'models/subscriber'
def test_reset_empty_table_with_custom_pk
Movie.delete_all
diff --git a/activerecord/test/cases/adapter_test_sqlserver.rb b/activerecord/test/cases/adapter_test_sqlserver.rb
index 494fc98a2f..3b66fa44c0 100644
--- a/activerecord/test/cases/adapter_test_sqlserver.rb
+++ b/activerecord/test/cases/adapter_test_sqlserver.rb
@@ -1,7 +1,7 @@
require 'abstract_unit'
-require 'fixtures/default'
-require 'fixtures/post'
-require 'fixtures/task'
+require 'models/default'
+require 'models/post'
+require 'models/task'
class SqlServerAdapterTest < ActiveSupport::TestCase
class TableWithRealColumn < ActiveRecord::Base; end
diff --git a/activerecord/test/cases/associations/inner_join_association_test.rb b/activerecord/test/cases/associations/inner_join_association_test.rb
index da594e459e..3f3cc4f167 100644
--- a/activerecord/test/cases/associations/inner_join_association_test.rb
+++ b/activerecord/test/cases/associations/inner_join_association_test.rb
@@ -1,9 +1,9 @@
require 'abstract_unit'
-require 'fixtures/post'
-require 'fixtures/comment'
-require 'fixtures/author'
-require 'fixtures/category'
-require 'fixtures/categorization'
+require 'models/post'
+require 'models/comment'
+require 'models/author'
+require 'models/category'
+require 'models/categorization'
class InnerJoinAssociationTest < ActiveSupport::TestCase
fixtures :authors, :posts, :comments, :categories, :categories_posts, :categorizations
diff --git a/activerecord/test/cases/associations/join_model_test.rb b/activerecord/test/cases/associations/join_model_test.rb
index c6a1e356a5..23ed9d1c5e 100644
--- a/activerecord/test/cases/associations/join_model_test.rb
+++ b/activerecord/test/cases/associations/join_model_test.rb
@@ -1,16 +1,16 @@
require 'abstract_unit'
-require 'fixtures/tag'
-require 'fixtures/tagging'
-require 'fixtures/post'
-require 'fixtures/item'
-require 'fixtures/comment'
-require 'fixtures/author'
-require 'fixtures/category'
-require 'fixtures/categorization'
-require 'fixtures/vertex'
-require 'fixtures/edge'
-require 'fixtures/book'
-require 'fixtures/citation'
+require 'models/tag'
+require 'models/tagging'
+require 'models/post'
+require 'models/item'
+require 'models/comment'
+require 'models/author'
+require 'models/category'
+require 'models/categorization'
+require 'models/vertex'
+require 'models/edge'
+require 'models/book'
+require 'models/citation'
class AssociationsJoinModelTest < ActiveSupport::TestCase
self.use_transactional_fixtures = false
diff --git a/activerecord/test/cases/associations_test.rb b/activerecord/test/cases/associations_test.rb
index a657da265d..451a17b3bf 100755
--- a/activerecord/test/cases/associations_test.rb
+++ b/activerecord/test/cases/associations_test.rb
@@ -1,21 +1,21 @@
require 'abstract_unit'
-require 'fixtures/developer'
-require 'fixtures/project'
-require 'fixtures/company'
-require 'fixtures/topic'
-require 'fixtures/reply'
-require 'fixtures/computer'
-require 'fixtures/customer'
-require 'fixtures/order'
-require 'fixtures/categorization'
-require 'fixtures/category'
-require 'fixtures/post'
-require 'fixtures/author'
-require 'fixtures/comment'
-require 'fixtures/tag'
-require 'fixtures/tagging'
-require 'fixtures/person'
-require 'fixtures/reader'
+require 'models/developer'
+require 'models/project'
+require 'models/company'
+require 'models/topic'
+require 'models/reply'
+require 'models/computer'
+require 'models/customer'
+require 'models/order'
+require 'models/categorization'
+require 'models/category'
+require 'models/post'
+require 'models/author'
+require 'models/comment'
+require 'models/tag'
+require 'models/tagging'
+require 'models/person'
+require 'models/reader'
class AssociationsTest < ActiveSupport::TestCase
fixtures :accounts, :companies, :developers, :projects, :developers_projects,
diff --git a/activerecord/test/cases/attribute_methods_test.rb b/activerecord/test/cases/attribute_methods_test.rb
index 4a09a4d63e..05737d1d15 100755
--- a/activerecord/test/cases/attribute_methods_test.rb
+++ b/activerecord/test/cases/attribute_methods_test.rb
@@ -1,5 +1,5 @@
require 'abstract_unit'
-require 'fixtures/topic'
+require 'models/topic'
class AttributeMethodsTest < ActiveSupport::TestCase
fixtures :topics
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb
index 00e563aaee..7c141ab5f6 100755
--- a/activerecord/test/cases/base_test.rb
+++ b/activerecord/test/cases/base_test.rb
@@ -1,18 +1,18 @@
require 'abstract_unit'
-require 'fixtures/topic'
-require 'fixtures/reply'
-require 'fixtures/company'
-require 'fixtures/customer'
-require 'fixtures/developer'
-require 'fixtures/project'
-require 'fixtures/default'
-require 'fixtures/auto_id'
-require 'fixtures/column_name'
-require 'fixtures/subscriber'
-require 'fixtures/keyboard'
-require 'fixtures/post'
-require 'fixtures/minimalistic'
-require 'fixtures/warehouse_thing'
+require 'models/topic'
+require 'models/reply'
+require 'models/company'
+require 'models/customer'
+require 'models/developer'
+require 'models/project'
+require 'models/default'
+require 'models/auto_id'
+require 'models/column_name'
+require 'models/subscriber'
+require 'models/keyboard'
+require 'models/post'
+require 'models/minimalistic'
+require 'models/warehouse_thing'
require 'rexml/document'
class Category < ActiveRecord::Base; end
diff --git a/activerecord/test/cases/binary_test.rb b/activerecord/test/cases/binary_test.rb
index f89660e4e1..e18a44f27e 100644
--- a/activerecord/test/cases/binary_test.rb
+++ b/activerecord/test/cases/binary_test.rb
@@ -8,7 +8,7 @@ require 'abstract_unit'
# BLOB data with DB2 or Firebird, because the length of a statement
# is limited to 32KB.
unless current_adapter?(:SQLServerAdapter, :SybaseAdapter, :DB2Adapter, :FirebirdAdapter)
- require 'fixtures/binary'
+ require 'models/binary'
class BinaryTest < ActiveSupport::TestCase
FIXTURES = %w(flowers.jpg example.log)
@@ -17,7 +17,7 @@ unless current_adapter?(:SQLServerAdapter, :SybaseAdapter, :DB2Adapter, :Firebir
Binary.delete_all
FIXTURES.each do |filename|
- data = File.read("#{File.dirname(__FILE__)}/fixtures/#{filename}").freeze
+ data = File.read("#{File.dirname(__FILE__)}/../assets/#{filename}").freeze
bin = Binary.new(:data => data)
assert_equal data, bin.data, 'Newly assigned data differs from original'
diff --git a/activerecord/test/cases/calculations_test.rb b/activerecord/test/cases/calculations_test.rb
index 7bee644947..4acd85ea08 100644
--- a/activerecord/test/cases/calculations_test.rb
+++ b/activerecord/test/cases/calculations_test.rb
@@ -1,6 +1,6 @@
require 'abstract_unit'
-require 'fixtures/company'
-require 'fixtures/topic'
+require 'models/company'
+require 'models/topic'
Company.has_many :accounts
diff --git a/activerecord/test/cases/column_alias_test.rb b/activerecord/test/cases/column_alias_test.rb
index da4b66554a..5b41ba677b 100644
--- a/activerecord/test/cases/column_alias_test.rb
+++ b/activerecord/test/cases/column_alias_test.rb
@@ -1,5 +1,5 @@
require 'abstract_unit'
-require 'fixtures/topic'
+require 'models/topic'
class TestColumnAlias < ActiveSupport::TestCase
fixtures :topics
diff --git a/activerecord/test/cases/connection_test_firebird.rb b/activerecord/test/cases/connection_test_firebird.rb
index eb0222b66f..1280025e1f 100644
--- a/activerecord/test/cases/connection_test_firebird.rb
+++ b/activerecord/test/cases/connection_test_firebird.rb
@@ -1,4 +1,4 @@
-require "#{File.dirname(__FILE__)}/abstract_unit"
+require 'abstract_unit'
class FirebirdConnectionTest < ActiveSupport::TestCase
def test_charset_properly_set
diff --git a/activerecord/test/cases/connection_test_mysql.rb b/activerecord/test/cases/connection_test_mysql.rb
index e49a326d2b..4a1e6cdfc4 100644
--- a/activerecord/test/cases/connection_test_mysql.rb
+++ b/activerecord/test/cases/connection_test_mysql.rb
@@ -1,4 +1,4 @@
-require "#{File.dirname(__FILE__)}/abstract_unit"
+require 'abstract_unit'
class MysqlConnectionTest < ActiveSupport::TestCase
def setup
diff --git a/activerecord/test/cases/date_time_test.rb b/activerecord/test/cases/date_time_test.rb
index 20020b24cc..46078fc8d6 100644
--- a/activerecord/test/cases/date_time_test.rb
+++ b/activerecord/test/cases/date_time_test.rb
@@ -1,6 +1,6 @@
require 'abstract_unit'
-require 'fixtures/topic'
-require 'fixtures/task'
+require 'models/topic'
+require 'models/task'
class DateTimeTest < ActiveSupport::TestCase
def test_saves_both_date_and_time
diff --git a/activerecord/test/cases/default_test_firebird.rb b/activerecord/test/cases/default_test_firebird.rb
index 841027b175..cc30c7f986 100644
--- a/activerecord/test/cases/default_test_firebird.rb
+++ b/activerecord/test/cases/default_test_firebird.rb
@@ -1,5 +1,5 @@
require 'abstract_unit'
-require 'fixtures/default'
+require 'models/default'
class DefaultTest < ActiveSupport::TestCase
def test_default_timestamp
diff --git a/activerecord/test/cases/defaults_test.rb b/activerecord/test/cases/defaults_test.rb
index 8a5c8e0530..187161d993 100644
--- a/activerecord/test/cases/defaults_test.rb
+++ b/activerecord/test/cases/defaults_test.rb
@@ -1,6 +1,6 @@
require 'abstract_unit'
-require 'fixtures/default'
-require 'fixtures/entrant'
+require 'models/default'
+require 'models/entrant'
class DefaultTest < ActiveSupport::TestCase
def test_nil_defaults_for_not_null_columns
diff --git a/activerecord/test/cases/deprecated_finder_test.rb b/activerecord/test/cases/deprecated_finder_test.rb
index 9c5a74cf02..a105c701dc 100755
--- a/activerecord/test/cases/deprecated_finder_test.rb
+++ b/activerecord/test/cases/deprecated_finder_test.rb
@@ -1,5 +1,5 @@
require 'abstract_unit'
-require 'fixtures/entrant'
+require 'models/entrant'
class DeprecatedFinderTest < ActiveSupport::TestCase
fixtures :entrants
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb
index 14f494776c..544186f1c5 100644
--- a/activerecord/test/cases/finder_test.rb
+++ b/activerecord/test/cases/finder_test.rb
@@ -1,12 +1,12 @@
require 'abstract_unit'
-require 'fixtures/author'
-require 'fixtures/comment'
-require 'fixtures/company'
-require 'fixtures/topic'
-require 'fixtures/reply'
-require 'fixtures/entrant'
-require 'fixtures/developer'
-require 'fixtures/post'
+require 'models/author'
+require 'models/comment'
+require 'models/company'
+require 'models/topic'
+require 'models/reply'
+require 'models/entrant'
+require 'models/developer'
+require 'models/post'
class FinderTest < ActiveSupport::TestCase
fixtures :companies, :topics, :entrants, :developers, :developers_projects, :posts, :comments, :accounts, :authors
diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb
index 51dbee6af3..3219c12dcf 100755
--- a/activerecord/test/cases/fixtures_test.rb
+++ b/activerecord/test/cases/fixtures_test.rb
@@ -1,20 +1,20 @@
require 'abstract_unit'
-require 'fixtures/post'
-require 'fixtures/binary'
-require 'fixtures/topic'
-require 'fixtures/computer'
-require 'fixtures/developer'
-require 'fixtures/company'
-require 'fixtures/task'
-require 'fixtures/reply'
-require 'fixtures/joke'
-require 'fixtures/course'
-require 'fixtures/category'
-require 'fixtures/parrot'
-require 'fixtures/pirate'
-require 'fixtures/treasure'
-require 'fixtures/matey'
-require 'fixtures/ship'
+require 'models/post'
+require 'models/binary'
+require 'models/topic'
+require 'models/computer'
+require 'models/developer'
+require 'models/company'
+require 'models/task'
+require 'models/reply'
+require 'models/joke'
+require 'models/course'
+require 'models/category'
+require 'models/parrot'
+require 'models/pirate'
+require 'models/treasure'
+require 'models/matey'
+require 'models/ship'
class FixturesTest < ActiveSupport::TestCase
self.use_instantiated_fixtures = true
@@ -27,7 +27,7 @@ class FixturesTest < ActiveSupport::TestCase
movies projects subscribers topics tasks )
MATCH_ATTRIBUTE_NAME = /[a-zA-Z][-_\w]*/
- BINARY_FIXTURE_PATH = File.dirname(__FILE__) + '/fixtures/flowers.jpg'
+ BINARY_FIXTURE_PATH = File.dirname(__FILE__) + '/../assets/flowers.jpg'
def test_clean_fixtures
FIXTURES.each do |name|
@@ -140,26 +140,26 @@ class FixturesTest < ActiveSupport::TestCase
end
def test_empty_yaml_fixture
- assert_not_nil Fixtures.new( Account.connection, "accounts", 'Account', File.dirname(__FILE__) + "/fixtures/naked/yml/accounts")
+ assert_not_nil Fixtures.new( Account.connection, "accounts", 'Account', File.dirname(__FILE__) + "/../fixtures/naked/yml/accounts")
end
def test_empty_yaml_fixture_with_a_comment_in_it
- assert_not_nil Fixtures.new( Account.connection, "companies", 'Company', File.dirname(__FILE__) + "/fixtures/naked/yml/companies")
+ assert_not_nil Fixtures.new( Account.connection, "companies", 'Company', File.dirname(__FILE__) + "/../fixtures/naked/yml/companies")
end
def test_dirty_dirty_yaml_file
assert_raises(Fixture::FormatError) do
- Fixtures.new( Account.connection, "courses", 'Course', File.dirname(__FILE__) + "/fixtures/naked/yml/courses")
+ Fixtures.new( Account.connection, "courses", 'Course', File.dirname(__FILE__) + "/../fixtures/naked/yml/courses")
end
end
def test_empty_csv_fixtures
- assert_not_nil Fixtures.new( Account.connection, "accounts", 'Account', File.dirname(__FILE__) + "/fixtures/naked/csv/accounts")
+ assert_not_nil Fixtures.new( Account.connection, "accounts", 'Account', File.dirname(__FILE__) + "/../fixtures/naked/csv/accounts")
end
def test_omap_fixtures
assert_nothing_raised do
- fixtures = Fixtures.new(Account.connection, 'categories', 'Category', File.dirname(__FILE__) + '/fixtures/categories_ordered')
+ fixtures = Fixtures.new(Account.connection, 'categories', 'Category', File.dirname(__FILE__) + '/../fixtures/categories_ordered')
i = 0
fixtures.each do |name, fixture|
@@ -430,7 +430,7 @@ class FixturesBrokenRollbackTest < ActiveSupport::TestCase
end
class LoadAllFixturesTest < ActiveSupport::TestCase
- self.fixture_path= File.join(File.dirname(__FILE__), '/fixtures/all')
+ self.fixture_path= File.join(File.dirname(__FILE__), '/../fixtures/all')
fixtures :all
def test_all_there
diff --git a/activerecord/test/cases/inheritance_test.rb b/activerecord/test/cases/inheritance_test.rb
index 092503f279..5e23142b8a 100755
--- a/activerecord/test/cases/inheritance_test.rb
+++ b/activerecord/test/cases/inheritance_test.rb
@@ -1,7 +1,7 @@
require 'abstract_unit'
-require 'fixtures/company'
-require 'fixtures/project'
-require 'fixtures/subscriber'
+require 'models/company'
+require 'models/project'
+require 'models/subscriber'
class InheritanceTest < ActiveSupport::TestCase
fixtures :companies, :projects, :subscribers, :accounts
diff --git a/activerecord/test/cases/json_serialization_test.rb b/activerecord/test/cases/json_serialization_test.rb
index 49711f625b..465c2454fc 100644
--- a/activerecord/test/cases/json_serialization_test.rb
+++ b/activerecord/test/cases/json_serialization_test.rb
@@ -1,10 +1,10 @@
require 'abstract_unit'
-require 'fixtures/contact'
-require 'fixtures/post'
-require 'fixtures/author'
-require 'fixtures/tagging'
-require 'fixtures/tag'
-require 'fixtures/comment'
+require 'models/contact'
+require 'models/post'
+require 'models/author'
+require 'models/tagging'
+require 'models/tag'
+require 'models/comment'
class JsonSerializationTest < ActiveSupport::TestCase
def setup
diff --git a/activerecord/test/cases/lifecycle_test.rb b/activerecord/test/cases/lifecycle_test.rb
index 91c6b8cc43..8d7b0eb3d2 100755
--- a/activerecord/test/cases/lifecycle_test.rb
+++ b/activerecord/test/cases/lifecycle_test.rb
@@ -1,7 +1,7 @@
require 'abstract_unit'
-require 'fixtures/topic'
-require 'fixtures/developer'
-require 'fixtures/reply'
+require 'models/topic'
+require 'models/developer'
+require 'models/reply'
class Topic; def after_find() end end
class Developer; def after_find() end end
diff --git a/activerecord/test/cases/locking_test.rb b/activerecord/test/cases/locking_test.rb
index da2b594c5d..eb82b13e19 100644
--- a/activerecord/test/cases/locking_test.rb
+++ b/activerecord/test/cases/locking_test.rb
@@ -1,7 +1,7 @@
require 'abstract_unit'
-require 'fixtures/person'
-require 'fixtures/reader'
-require 'fixtures/legacy_thing'
+require 'models/person'
+require 'models/reader'
+require 'models/legacy_thing'
class LockWithoutDefault < ActiveRecord::Base; end
diff --git a/activerecord/test/cases/method_scoping_test.rb b/activerecord/test/cases/method_scoping_test.rb
index 00304ba5cf..e8e053a311 100644
--- a/activerecord/test/cases/method_scoping_test.rb
+++ b/activerecord/test/cases/method_scoping_test.rb
@@ -1,9 +1,9 @@
require 'abstract_unit'
-require 'fixtures/developer'
-require 'fixtures/project'
-require 'fixtures/comment'
-require 'fixtures/post'
-require 'fixtures/category'
+require 'models/developer'
+require 'models/project'
+require 'models/comment'
+require 'models/post'
+require 'models/category'
class MethodScopingTest < ActiveSupport::TestCase
fixtures :developers, :projects, :comments, :posts
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb
index c349f1cb1b..af34fd47bf 100644
--- a/activerecord/test/cases/migration_test.rb
+++ b/activerecord/test/cases/migration_test.rb
@@ -1,11 +1,11 @@
require 'abstract_unit'
require 'bigdecimal/util'
-require 'fixtures/person'
-require 'fixtures/topic'
-require File.dirname(__FILE__) + '/fixtures/migrations/1_people_have_last_names'
-require File.dirname(__FILE__) + '/fixtures/migrations/2_we_need_reminders'
-require File.dirname(__FILE__) + '/fixtures/migrations_with_decimal/1_give_me_big_numbers'
+require 'models/person'
+require 'models/topic'
+require 'migrations/valid/1_people_have_last_names'
+require 'migrations/valid/2_we_need_reminders'
+require 'migrations/decimal/1_give_me_big_numbers'
if ActiveRecord::Base.connection.supports_migrations?
class BigNumber < ActiveRecord::Base; end
@@ -695,7 +695,7 @@ if ActiveRecord::Base.connection.supports_migrations?
assert !Person.column_methods_hash.include?(:last_name)
assert !Reminder.table_exists?
- ActiveRecord::Migrator.up(File.dirname(__FILE__) + '/fixtures/migrations/')
+ ActiveRecord::Migrator.up(File.dirname(__FILE__) + '/../migrations/valid')
assert_equal 3, ActiveRecord::Migrator.current_version
Person.reset_column_information
@@ -703,7 +703,7 @@ if ActiveRecord::Base.connection.supports_migrations?
assert Reminder.create("content" => "hello world", "remind_at" => Time.now)
assert_equal "hello world", Reminder.find(:first).content
- ActiveRecord::Migrator.down(File.dirname(__FILE__) + '/fixtures/migrations/')
+ ActiveRecord::Migrator.down(File.dirname(__FILE__) + '/../migrations/valid')
assert_equal 0, ActiveRecord::Migrator.current_version
Person.reset_column_information
@@ -715,22 +715,22 @@ if ActiveRecord::Base.connection.supports_migrations?
assert !Person.column_methods_hash.include?(:last_name)
assert !Reminder.table_exists?
- ActiveRecord::Migrator.up(File.dirname(__FILE__) + '/fixtures/migrations/', 1)
+ ActiveRecord::Migrator.up(File.dirname(__FILE__) + '/../migrations/valid', 1)
Person.reset_column_information
assert Person.column_methods_hash.include?(:last_name)
assert !Reminder.table_exists?
- ActiveRecord::Migrator.up(File.dirname(__FILE__) + '/fixtures/migrations/', 2)
+ ActiveRecord::Migrator.up(File.dirname(__FILE__) + '/../migrations/valid', 2)
assert Reminder.create("content" => "hello world", "remind_at" => Time.now)
assert_equal "hello world", Reminder.find(:first).content
end
def test_migrator_one_down
- ActiveRecord::Migrator.up(File.dirname(__FILE__) + '/fixtures/migrations/')
+ ActiveRecord::Migrator.up(File.dirname(__FILE__) + '/../migrations/valid')
- ActiveRecord::Migrator.down(File.dirname(__FILE__) + '/fixtures/migrations/', 1)
+ ActiveRecord::Migrator.down(File.dirname(__FILE__) + '/../migrations/valid', 1)
Person.reset_column_information
assert Person.column_methods_hash.include?(:last_name)
@@ -738,39 +738,39 @@ if ActiveRecord::Base.connection.supports_migrations?
end
def test_migrator_one_up_one_down
- ActiveRecord::Migrator.up(File.dirname(__FILE__) + '/fixtures/migrations/', 1)
- ActiveRecord::Migrator.down(File.dirname(__FILE__) + '/fixtures/migrations/', 0)
+ ActiveRecord::Migrator.up(File.dirname(__FILE__) + '/../migrations/valid', 1)
+ ActiveRecord::Migrator.down(File.dirname(__FILE__) + '/../migrations/valid', 0)
assert !Person.column_methods_hash.include?(:last_name)
assert !Reminder.table_exists?
end
def test_migrator_verbosity
- ActiveRecord::Migrator.up(File.dirname(__FILE__) + '/fixtures/migrations/', 1)
+ ActiveRecord::Migrator.up(File.dirname(__FILE__) + '/../migrations/valid', 1)
assert PeopleHaveLastNames.message_count > 0
PeopleHaveLastNames.message_count = 0
- ActiveRecord::Migrator.down(File.dirname(__FILE__) + '/fixtures/migrations/', 0)
+ ActiveRecord::Migrator.down(File.dirname(__FILE__) + '/../migrations/valid', 0)
assert PeopleHaveLastNames.message_count > 0
PeopleHaveLastNames.message_count = 0
end
def test_migrator_verbosity_off
PeopleHaveLastNames.verbose = false
- ActiveRecord::Migrator.up(File.dirname(__FILE__) + '/fixtures/migrations/', 1)
+ ActiveRecord::Migrator.up(File.dirname(__FILE__) + '/../migrations/valid', 1)
assert PeopleHaveLastNames.message_count.zero?
- ActiveRecord::Migrator.down(File.dirname(__FILE__) + '/fixtures/migrations/', 0)
+ ActiveRecord::Migrator.down(File.dirname(__FILE__) + '/../migrations/valid', 0)
assert PeopleHaveLastNames.message_count.zero?
end
def test_migrator_going_down_due_to_version_target
- ActiveRecord::Migrator.up(File.dirname(__FILE__) + '/fixtures/migrations/', 1)
- ActiveRecord::Migrator.migrate(File.dirname(__FILE__) + '/fixtures/migrations/', 0)
+ ActiveRecord::Migrator.up(File.dirname(__FILE__) + '/../migrations/valid', 1)
+ ActiveRecord::Migrator.migrate(File.dirname(__FILE__) + '/../migrations/valid', 0)
assert !Person.column_methods_hash.include?(:last_name)
assert !Reminder.table_exists?
- ActiveRecord::Migrator.migrate(File.dirname(__FILE__) + '/fixtures/migrations/')
+ ActiveRecord::Migrator.migrate(File.dirname(__FILE__) + '/../migrations/valid')
Person.reset_column_information
assert Person.column_methods_hash.include?(:last_name)
@@ -863,20 +863,20 @@ if ActiveRecord::Base.connection.supports_migrations?
def test_migrator_with_duplicates
assert_raises(ActiveRecord::DuplicateMigrationVersionError) do
- ActiveRecord::Migrator.migrate(File.dirname(__FILE__) + '/fixtures/migrations_with_duplicate/', nil)
+ ActiveRecord::Migrator.migrate(File.dirname(__FILE__) + '/../migrations/duplicate', nil)
end
end
def test_migrator_with_missing_version_numbers
- ActiveRecord::Migrator.migrate(File.dirname(__FILE__) + '/fixtures/migrations_with_missing_versions/', 500)
+ ActiveRecord::Migrator.migrate(File.dirname(__FILE__) + '/../migrations/missing', 500)
assert !Person.column_methods_hash.include?(:middle_name)
- assert_equal 4, ActiveRecord::Migrator.current_version
+ assert_equal 4, ActiveRecord::Migrator.current_version
- ActiveRecord::Migrator.migrate(File.dirname(__FILE__) + '/fixtures/migrations_with_missing_versions/', 2)
- Person.reset_column_information
- assert !Reminder.table_exists?
+ ActiveRecord::Migrator.migrate(File.dirname(__FILE__) + '/../migrations/missing', 2)
+ Person.reset_column_information
+ assert !Reminder.table_exists?
assert Person.column_methods_hash.include?(:last_name)
- assert_equal 2, ActiveRecord::Migrator.current_version
+ assert_equal 2, ActiveRecord::Migrator.current_version
end
def test_create_table_with_custom_sequence_name
diff --git a/activerecord/test/cases/migration_test_firebird.rb b/activerecord/test/cases/migration_test_firebird.rb
index 5c7dbd7a35..bf8166bcee 100644
--- a/activerecord/test/cases/migration_test_firebird.rb
+++ b/activerecord/test/cases/migration_test_firebird.rb
@@ -1,5 +1,5 @@
require 'abstract_unit'
-require 'fixtures/course'
+require 'models/course'
class FirebirdMigrationTest < ActiveSupport::TestCase
self.use_transactional_fixtures = false
diff --git a/activerecord/test/cases/modules_test.rb b/activerecord/test/cases/modules_test.rb
index cced0bb895..4686aad44e 100644
--- a/activerecord/test/cases/modules_test.rb
+++ b/activerecord/test/cases/modules_test.rb
@@ -1,5 +1,5 @@
require 'abstract_unit'
-require 'fixtures/company_in_module'
+require 'models/company_in_module'
class ModulesTest < ActiveSupport::TestCase
fixtures :accounts, :companies, :projects, :developers
diff --git a/activerecord/test/cases/multiple_db_test.rb b/activerecord/test/cases/multiple_db_test.rb
index 5d64a3efaa..79477f5150 100644
--- a/activerecord/test/cases/multiple_db_test.rb
+++ b/activerecord/test/cases/multiple_db_test.rb
@@ -1,8 +1,8 @@
require 'abstract_unit'
-require 'fixtures/entrant'
+require 'models/entrant'
# So we can test whether Course.connection survives a reload.
-require_dependency 'fixtures/course'
+require_dependency 'models/course'
class MultipleDbTest < ActiveSupport::TestCase
self.use_transactional_fixtures = false
@@ -53,7 +53,7 @@ class MultipleDbTest < ActiveSupport::TestCase
Dependencies.clear
Object.send(:remove_const, :Course)
- require_dependency 'fixtures/course'
+ require_dependency 'models/course'
assert Course.connection
end
diff --git a/activerecord/test/cases/pk_test.rb b/activerecord/test/cases/pk_test.rb
index a9e9150f23..f5f2eb3409 100644
--- a/activerecord/test/cases/pk_test.rb
+++ b/activerecord/test/cases/pk_test.rb
@@ -1,10 +1,10 @@
-require "#{File.dirname(__FILE__)}/abstract_unit"
-require 'fixtures/topic'
-require 'fixtures/reply'
-require 'fixtures/subscriber'
-require 'fixtures/movie'
-require 'fixtures/keyboard'
-require 'fixtures/mixed_case_monkey'
+require 'abstract_unit'
+require 'models/topic'
+require 'models/reply'
+require 'models/subscriber'
+require 'models/movie'
+require 'models/keyboard'
+require 'models/mixed_case_monkey'
class PrimaryKeysTest < ActiveSupport::TestCase
fixtures :topics, :subscribers, :movies, :mixed_case_monkeys
diff --git a/activerecord/test/cases/query_cache_test.rb b/activerecord/test/cases/query_cache_test.rb
index 242223161c..969a407c95 100644
--- a/activerecord/test/cases/query_cache_test.rb
+++ b/activerecord/test/cases/query_cache_test.rb
@@ -1,10 +1,10 @@
require 'abstract_unit'
-require 'fixtures/topic'
-require 'fixtures/reply'
-require 'fixtures/task'
-require 'fixtures/course'
-require 'fixtures/category'
-require 'fixtures/post'
+require 'models/topic'
+require 'models/reply'
+require 'models/task'
+require 'models/course'
+require 'models/category'
+require 'models/post'
class QueryCacheTest < ActiveSupport::TestCase
diff --git a/activerecord/test/cases/readonly_test.rb b/activerecord/test/cases/readonly_test.rb
index 5674a4b442..aea5463aa1 100755
--- a/activerecord/test/cases/readonly_test.rb
+++ b/activerecord/test/cases/readonly_test.rb
@@ -1,10 +1,10 @@
require 'abstract_unit'
-require 'fixtures/post'
-require 'fixtures/comment'
-require 'fixtures/developer'
-require 'fixtures/project'
-require 'fixtures/reader'
-require 'fixtures/person'
+require 'models/post'
+require 'models/comment'
+require 'models/developer'
+require 'models/project'
+require 'models/reader'
+require 'models/person'
# Dummy class methods to test implicit association scoping.
def Comment.foo() find :first end
diff --git a/activerecord/test/cases/reflection_test.rb b/activerecord/test/cases/reflection_test.rb
index 7790747cea..3f742491f3 100644
--- a/activerecord/test/cases/reflection_test.rb
+++ b/activerecord/test/cases/reflection_test.rb
@@ -1,9 +1,9 @@
require 'abstract_unit'
-require 'fixtures/topic'
-require 'fixtures/customer'
-require 'fixtures/company'
-require 'fixtures/company_in_module'
-require 'fixtures/subscriber'
+require 'models/topic'
+require 'models/customer'
+require 'models/company'
+require 'models/company_in_module'
+require 'models/subscriber'
class ReflectionTest < ActiveSupport::TestCase
fixtures :topics, :customers, :companies, :subscribers
diff --git a/activerecord/test/cases/reserved_word_test_mysql.rb b/activerecord/test/cases/reserved_word_test_mysql.rb
index 0600c9460e..0087a0e8c6 100644
--- a/activerecord/test/cases/reserved_word_test_mysql.rb
+++ b/activerecord/test/cases/reserved_word_test_mysql.rb
@@ -1,4 +1,4 @@
-require "#{File.dirname(__FILE__)}/abstract_unit"
+require 'abstract_unit'
class Group < ActiveRecord::Base
Group.table_name = 'group'
diff --git a/activerecord/test/cases/schema_dumper_test.rb b/activerecord/test/cases/schema_dumper_test.rb
index 2b7226ec3b..b247412411 100644
--- a/activerecord/test/cases/schema_dumper_test.rb
+++ b/activerecord/test/cases/schema_dumper_test.rb
@@ -1,5 +1,5 @@
require 'abstract_unit'
-require "#{File.dirname(__FILE__)}/../lib/active_record/schema_dumper"
+require 'active_record/schema_dumper'
require 'stringio'
if ActiveRecord::Base.connection.respond_to?(:tables)
diff --git a/activerecord/test/cases/serialization_test.rb b/activerecord/test/cases/serialization_test.rb
index e14fa02780..cb35c52397 100644
--- a/activerecord/test/cases/serialization_test.rb
+++ b/activerecord/test/cases/serialization_test.rb
@@ -1,5 +1,5 @@
require 'abstract_unit'
-require 'fixtures/contact'
+require 'models/contact'
class SerializationTest < ActiveSupport::TestCase
FORMATS = [ :xml, :json ]
@@ -44,4 +44,4 @@ class SerializationTest < ActiveSupport::TestCase
assert_equal @contact_attributes[:awesome], contact.awesome, "For #{format}"
end
end
-end \ No newline at end of file
+end
diff --git a/activerecord/test/cases/synonym_test_oracle.rb b/activerecord/test/cases/synonym_test_oracle.rb
index c053bacb69..e8f1e8a4bd 100644
--- a/activerecord/test/cases/synonym_test_oracle.rb
+++ b/activerecord/test/cases/synonym_test_oracle.rb
@@ -1,6 +1,6 @@
require 'abstract_unit'
-require 'fixtures/topic'
-require 'fixtures/subject'
+require 'models/topic'
+require 'models/subject'
# confirm that synonyms work just like tables; in this case
# the "subjects" table in Oracle (defined in oci.sql) is just
diff --git a/activerecord/test/cases/table_name_test_sqlserver.rb b/activerecord/test/cases/table_name_test_sqlserver.rb
index f52a3da5fb..af88a63371 100644
--- a/activerecord/test/cases/table_name_test_sqlserver.rb
+++ b/activerecord/test/cases/table_name_test_sqlserver.rb
@@ -1,5 +1,5 @@
require 'abstract_unit'
-require "#{File.dirname(__FILE__)}/../lib/active_record/schema"
+require 'active_record/schema'
if ActiveRecord::Base.connection.supports_migrations?
class Order < ActiveRecord::Base
diff --git a/activerecord/test/cases/threaded_connections_test.rb b/activerecord/test/cases/threaded_connections_test.rb
index ec90df5294..247f4c8e68 100644
--- a/activerecord/test/cases/threaded_connections_test.rb
+++ b/activerecord/test/cases/threaded_connections_test.rb
@@ -1,6 +1,6 @@
require 'abstract_unit'
-require 'fixtures/topic'
-require 'fixtures/reply'
+require 'models/topic'
+require 'models/reply'
unless %w(FrontBase).include? ActiveRecord::Base.connection.adapter_name
class ThreadedConnectionsTest < ActiveSupport::TestCase
diff --git a/activerecord/test/cases/transactions_test.rb b/activerecord/test/cases/transactions_test.rb
index f36ee3f4bb..d9bcc88349 100644
--- a/activerecord/test/cases/transactions_test.rb
+++ b/activerecord/test/cases/transactions_test.rb
@@ -1,7 +1,7 @@
require 'abstract_unit'
-require 'fixtures/topic'
-require 'fixtures/reply'
-require 'fixtures/developer'
+require 'models/topic'
+require 'models/reply'
+require 'models/developer'
class TransactionTest < ActiveSupport::TestCase
self.use_transactional_fixtures = false
diff --git a/activerecord/test/cases/validations_test.rb b/activerecord/test/cases/validations_test.rb
index daec199be1..e48844ece7 100755
--- a/activerecord/test/cases/validations_test.rb
+++ b/activerecord/test/cases/validations_test.rb
@@ -1,9 +1,9 @@
require 'abstract_unit'
-require 'fixtures/topic'
-require 'fixtures/reply'
-require 'fixtures/person'
-require 'fixtures/developer'
-require 'fixtures/warehouse_thing'
+require 'models/topic'
+require 'models/reply'
+require 'models/person'
+require 'models/developer'
+require 'models/warehouse_thing'
# The following methods in Topic are used in test_conditional_validation_*
class Topic
diff --git a/activerecord/test/cases/xml_serialization_test.rb b/activerecord/test/cases/xml_serialization_test.rb
index 2db75fad46..95185bb743 100644
--- a/activerecord/test/cases/xml_serialization_test.rb
+++ b/activerecord/test/cases/xml_serialization_test.rb
@@ -1,9 +1,9 @@
require 'abstract_unit'
-require 'fixtures/contact'
-require 'fixtures/post'
-require 'fixtures/author'
-require 'fixtures/tagging'
-require 'fixtures/comment'
+require 'models/contact'
+require 'models/post'
+require 'models/author'
+require 'models/tagging'
+require 'models/comment'
class XmlSerializationTest < ActiveSupport::TestCase
def test_should_serialize_default_root
@@ -199,4 +199,4 @@ class DatabaseConnectedXmlSerializationTest < ActiveSupport::TestCase
assert types.include?('StiPost')
end
-end \ No newline at end of file
+end