Closed strika closed 10 years ago
@strika I don't think it's necessary. And your patch seems not to work in nested cases because @inherited_tables
aren't stored anywhere.
Could you give us a specific example or write a test code?
@deeeki I can't. I'm not using DatabaseRewinder actively. And the version I was using is now 9 months old. From what I can remember, DatabaseRewinder didn't work with before(:all)
blocks at all. And the patch made it work for our case. But it didn't work if you have mixed before(:all)
and before(:each)
blocks.
Thank you for your reply! I see, so I'll close this PR for now. And It would be happy if you try DatabaseRewinder again. :smiley:
OK. That sounds reasonable. I'm putting it on the list again. My conclusion back then is that it wasn't stable enough for our test suite. But that might have changed. Cheers.
Adds
before(:all)
blocks compatibility for simple cases - when RSpec is configured as:and when there is only one
before(:all)
block on the top. More complex cases, with multiplebefore(:all)
andbefore(:each)
blocks are not supported and I guess fall off the DatabaseRewinder simple philosophy.