开发者

How might you make a Rails test fixture persistent between tests?

开发者 https://www.devze.com 2022-12-23 16:44 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消