I recently created a new rails project and tried test driven development. So I wrote a few tests, the following error is reported when rake is used to call the test or directly execute the ruby test program.
Undefined method 'use _ transactional_fixtures ='
It's really amazing. I tried to check MySQL and check that there is no problem with the checklist type (InnoDB). I further checked that my testcase was not actually injected with rails extensions, all of them have become the most common testcase. It's really depressing! When Google checked for half a day at night, the problem was not solved.
After consulting Cookoo on the next day, I tested it again and found that this problem was not found in the newly created rails project. So I suspected there was a problem with the installed plug-in and deleted all the plug-ins, the problem persists... (omitted in the middle )... I finally found that it was caused by the zentest gem package and tried to remove the file zentest/test/test_help.rb. The problem was solved.
Next, I analyzed the cause and found that my project uses cached_model. cached_model will introduce zentest, test_help.rb in zentest, and test_help.rb in rails, because cached_model will load first, therefore, zentest overwrites the later test_help, which directly causes the rails environment to fail to load.
Zentest (test_help.rb) rails (test_help.rb) cannot coexist, so it is better to remove the former.