aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-02-25 17:31:43 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-02-25 17:31:43 +0000
commit87b7b5b3e74cb6ce3efc7e472c933bf846b26cc3 (patch)
tree21aa7e606c4c0c317e671ef771cab37e0f740da8 /railties
parent781985f7f229eb665b3eed693eb9642caebc44a0 (diff)
downloadrails-87b7b5b3e74cb6ce3efc7e472c933bf846b26cc3.tar.gz
rails-87b7b5b3e74cb6ce3efc7e472c933bf846b26cc3.tar.bz2
rails-87b7b5b3e74cb6ce3efc7e472c933bf846b26cc3.zip
Added fixtures :all to test_helper.rb to assume that most people just want all their fixtures loaded all the time [DHH] Added fixtures :all as a way of loading all fixtures in the fixture directory at once (closes #7214) [manfred]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6227 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/helpers/test_helper.rb7
2 files changed, 8 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index 1f43cce9fc..8411c12b2c 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Added fixtures :all to test_helper.rb to assume that most people just want all their fixtures loaded all the time [DHH]
+
* Added config/initializers where all ruby files within it are automatically loaded after the Rails configuration is done, so you don't have to litter the environment.rb file with a ton of mixed stuff [DHH]
* For new apps, generate a random secret for the cookie-based session store. [Jeremy Kemper]
diff --git a/railties/helpers/test_helper.rb b/railties/helpers/test_helper.rb
index a299c7f6db..d13753a655 100644
--- a/railties/helpers/test_helper.rb
+++ b/railties/helpers/test_helper.rb
@@ -24,5 +24,10 @@ class Test::Unit::TestCase
# then set this back to true.
self.use_instantiated_fixtures = false
+ # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
+ # If you need to control the loading order (due to foreign key constraints etc), you'll
+ # need to change this line to explicitly name the order you desire.
+ fixtures :all
+
# Add more helper methods to be used by all tests here...
-end
+end \ No newline at end of file