#51 √ out-of-date
Chad Humphries

[#11726] Rspec on Rails does not use Active Record's fixture optimization

Reported by Chad Humphries | November 19th, 2007 @ 04:19 AM

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.

Comments and changes to this ticket

  • Chad Humphries

    Chad Humphries November 19th, 2007 @ 04:19 AM

    Date: 2007-09-06 07:43

    Sender: David Chelimsky

    Brian - in light of the current refactoring to concrete classes,

    I think this can be closed - yes?

    Date: 2007-06-20 19:02

    Sender: Brian Takita

    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.

  • David Chelimsky

    David Chelimsky July 19th, 2008 @ 04:13 AM

      • → State changed from “new” to “out-of-date”
      • → Tag changed from “” to “bug”

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Behaviour Driven Development for Ruby.

Shared Ticket Bins

People watching this ticket

Tags