Enable loading fixtures from arbitrary locations
Reported by Jacek Becela | July 9th, 2008 @ 09:56 PM | in No-Milestone-Assigned
This patch enables loading fixtures from subdirectories of spec/fixtures.
This allows to have two or more sets of fixtures in a project - very helpful if someone needs a lot of typical "lorem ipsum" fixtures (i.e. when developing layouts) while others need compact fixtures to be used solely for tests.
You can rake spec:db:fixtures:load FIXTURES_DIR=real and expect to spec/fixtures/real/* to be loaded.
This patch has no tests - I'd be happy to write them if someone points me in the right direction.
I also submitted very similar patch to Rails: http://rails.lighthouseapp.com/p...
Comments and changes to this ticket
-
Jacek Becela July 14th, 2008 @ 09:46 AM
Rails version of this patch was just commited: http://github.com/rails/rails/co...
-
David Chelimsky July 14th, 2008 @ 01:33 PM
Since you can do this with Rails directly, it seems to me we don't need this supported explicitly in rspec. Is that correct?
-
Jacek Becela July 14th, 2008 @ 02:33 PM
I'm afraid this would be needed in rspec-rails since its has its own separate task that loads fixtures from spec/fixtures (as opposed to test/fixtures in Rails).
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.
