[#14901] add unit_record (or similar) support
Reported by Chad Humphries | November 19th, 2007 @ 06:35 AM
unit_record allows you to enforce a rule that your tests never touch the database.
This request is that RSpec provide support for something similar, but that it be configurable at the spec level - so
you can have arbitrary groups of specs that are not allowed to touch the DB and others that are.
Comments and changes to this ticket
-
-

Matt Scilipoti November 19th, 2007 @ 11:07 AM
+1
David mentioned that rspec only required minor updates to use unit_record. Please share these updates. At least give me the option of using this for all my specs. I'll separate them as I need to.
Among my feeble attempts, I have updated DisconnectedFixtures to override reset_cache, but reset_cache is still atttempting to create a connection:
/vendor/rails/activerecord/lib/active_record/fixtures.rb:224:in `reset_cache':
-
James Baker September 11th, 2008 @ 11:18 PM
- → Tag changed from to featurerequest
+1
I came here from http://rubyforge.org/pipermail/r... seeking to use unit_record for some, but not all, of my specs. (Also with the notion of 'tagging' spec contexts to belong to one suite or the other, but that's just my own plan. I don't want to break up suites on a file granularity, but on a context granularity.)
However with the release of 1.1.4 http://blog.davidchelimsky.net/2... and stub_model, is this feature request being dropped? I could go either way, and will probably play around with stub_model & suite splitting in the next week.
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.
