I'm trying to开发者_运维问答 test a plugin that i wrote by running:
rake spec:plugins
When i execute this command it appears that it drops my database tables (in my test DB) and then runs a migration without any plugins loaded to give me a clean database. This would normally be fine, but I am using a plugin that allows me to set index length limits for MYSQL, so if I run a migration without that plugin, then i get a syntax error. This means that i cannot test my plugin with the rspec rake command.
I can't find any documentation for this command, is there a way to get it to not run any migrations before it executes?
Try setting this in your plugin spec:
Spec::Runner.configure do |config|
  config.use_transactional_fixtures = false
end
Of course this means you have to ensure the test DB is in the correct state for your tests, and that you clean up any modifications on exit.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论