[rspec-devel] [ rspec-Bugs-11726 ] Rspec on Rails does not use Active Record's fixture optimization

noreply at rubyforge.org noreply at rubyforge.org
Wed Jun 20 19:02:45 EDT 2007


Bugs item #11726, was opened at 2007-06-20 15:43
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11726&group_id=797

Category: rails plugin
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Brian Takita (btakita)
Assigned to: Nobody (None)
Summary: Rspec on Rails does not use Active Record's fixture optimization

Initial Comment:
Active Record fixtures are "cached" in a Hash based on the class. Since Rspec uses anonymous classes, there are no cache hits.

See fixtures.rb in ActiveRecord line 537.

If we can figure out how to utilize there cached fixtures, specs that use fixtures will be considerably faster.

----------------------------------------------------------------------

>Comment By: Brian Takita (btakita)
Date: 2007-06-20 16:02

Message:
The other benefit to fixing this is using "all" of the
fixtures for every example would pretty much be free, as
long as transactional fixtures are used.

This means we don't need to worry about which fixtures need
to be loaded for the example.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11726&group_id=797


More information about the rspec-devel mailing list