From 87b7b5b3e74cb6ce3efc7e472c933bf846b26cc3 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 25 Feb 2007 17:31:43 +0000 Subject: 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 --- railties/CHANGELOG | 2 ++ railties/helpers/test_helper.rb | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'railties') 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 -- cgit v1.2.3