简体   繁体   中英

How to load fixtures using Minitest and Rails 3.0.10?

I have a Rails 3.0.10 project using the minitest-rails gem (running in JRuby 1.6.5 == Ruby 1.9.2). I would like to use all of our existing Test::Unit test cases with minimal changes in order to start using Minitest. Right now I can run tests but many fail because fixtures are not being loaded. I have yet to figure out how to make that work. If I change ActionController::TestCase to MiniTest::Unit::TestCase then the fixtures function doesn't work. I've tried the links here and the links within that one without any success. So the question is how to continue using ActionController::TestCase with the MiniTest gem or how to switch to MiniTest::Unit::TestCase and have fixtures load.

Please try upgrading to version 0.1, which is dramatically improved across the board. Stuff like fixtures actually work now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM