我填充了一个要对其运行 rspec 测试的数据库。
Rspec 似乎在开始测试之前删除了数据库。我如何告诉 Rspec 不要删除这个 test_db?
我在 Rails / Rspec 环境之外填充数据库。构建构建数据库所需的所有工厂对于项目范围来说是不切实际的,但我想针对现有数据库进行测试。
昨天要运行我的测试,我只需要rspec在命令行上运行。
今天在做了 git pull 和等等之后。我收到这个错误
gems/bundler-1.6.2/lib/bundler/runtime.rb:34:in 'block in setup': You have already activated rspec-support 3.0.3, but your Gemfile requires rspec-support 3.0.0. Prepending 'bundle exec' to your command may solve this. (Gem::LoadError)
Run Code Online (Sandbox Code Playgroud)
是的bundle exec rspec,可以运行并运行我的测试。这里“幕后”到底发生了什么?