rails3 rake does not run my tests

ε祈祈猫儿з 提交于 2019-12-24 10:37:59

问题


In a fresh R3 app, I seem to be unable to run any tests (there are 2, the canonical functional test for "/" and another unit test I created)

See this output:

rails_app$ rake test --trace
(in /Users/jan/portfolio/rails_app)
** Invoke test (first_time, not_needed)
rails_app$

What could be wrong? What is the meaning of first_time, not_needed'? t might have to do with the fact, that I am using Mongoid...


回答1:


When I followed the instructions for Mongoid's installation, I replaced

require 'rails/all'

with

require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"

after learning about (and inserting)

require "rails/test_unit/railtie"

tests started to get picked up



来源:https://stackoverflow.com/questions/3844251/rails3-rake-does-not-run-my-tests

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!