How might you make a Rails test fixture persistent between tests?
I have a good half-dozen fixtures in my Rails test suite - some quite large - that represent static look-up tables in the database. Since their values theoretically don't change, I'd like to save the time of wiping and reloading the tables between each test. Is there a trick/plug-in/gem/hack to demarcate these fixtur开发者_StackOverflowes as only needing to be loaded once before all the tests run and not wiped between each?
You can desactivate rollback transaction in all your test.
Or you can add this fixtures before all of your test. Before the begin of transaction.
精彩评论