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 --- activerecord/test/fixtures_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'activerecord/test/fixtures_test.rb') diff --git a/activerecord/test/fixtures_test.rb b/activerecord/test/fixtures_test.rb index 35882526a1..7ccfc9be86 100755 --- a/activerecord/test/fixtures_test.rb +++ b/activerecord/test/fixtures_test.rb @@ -399,3 +399,12 @@ class FixturesBrokenRollbackTest < Test::Unit::TestCase raise 'argh' end end + +class LoadAllFixturesTest < Test::Unit::TestCase + write_inheritable_attribute :fixture_path, File.join(File.dirname(__FILE__), '/fixtures/all') + fixtures :all + + def test_all_there + assert_equal %w(developers people tasks), fixture_table_names.sort + end +end -- cgit v1.2.3