rails3 rake 不运行我的测试 [英] rails3 rake does not run my tests

查看:43
本文介绍了rails3 rake 不运行我的测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在新的 R3 应用程序中,我似乎无法运行任何测试(有 2 个,/"的规范功能测试和我创建的另一个单元测试)

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)

看到这个输出:

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

可能有什么问题?first_time, not_needed 是什么意思?这可能与我使用的是 Mongoid 的事实有关...

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...

推荐答案

当我按照 Mongoid 的安装说明进行时,我替换了

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

require 'rails/all'

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

了解(并插入)后

require "rails/test_unit/railtie"

开始接受测试

这篇关于rails3 rake 不运行我的测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆