Plugins - preload_fixtures

StarAdd to favorites

PreloadFixtures simply preloads ALL your fixtures at the beginning of your test cycle. It forces the system into using transactional fixtures, which you'll need because you're only loading the fixtures once! Make sure to use this plugin only when your database supports transactions.

Usage
=====

1. Install the plugin
2. Add the following to test/test_helper.rb

PreloadFixtures.preload!
PreloadFixtures.instantiate!(Test::Unit::TestCase)

3. The "fixtures" function in a test is now overloaded to do nothing. All fixtures in the directory will be loaded once and then the tests will be run.

David Stevenson

http://elctech.com/blog

https://wush.net/svn/public/preload_fixtures

Rails' (MIT)

  • Currently 3.7/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Testing

Tags

Comments

Add a comment
Marc-André 24 Jul 2008

Isn't this the default as of (at least) rails 2.1 ? I see a fixtures :all in my test_helper.rb

Rebecca Blyth 24 Oct 2007

This plugin is useful but does break stuff at the moment - notably the ability to specify a your own teardown method in your TestCases. I'm not sure why.

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.

Have a comment?