rspec总是返回错误 [英] rspec Always Returns Errors

查看:109
本文介绍了rspec总是返回错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行:

I run:

$ bundle exec rspec spec/

接收到以下消息:

And receive this message:

C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/lib/rspec/core.rb:78:in `require': no such file to load -- rspec/expectations (LoadError) 
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0 .1/lib/rspec/core.rb:78:in `<top (required)>' from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0 .1/lib/rspec/autorun.rb:1:in `require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/lib/rspec/autorun.rb:1:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/bin/rspec:2:in `require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/bin/rspec:2:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/bin/rspec:19:in `load'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/bin/rspec:19:in `<main>'

在我的Gemfile中:

In my Gemfile:

group :development do
gem 'rspec-core', '2.0.1'
gem 'annotate', :git => 'git://github.com/ctran/annotate_models.git'
end

什么为了运行rspec,我需要做什么?

What do I need to do in order to run rspec?

推荐答案

rspec-rails ,它安装了核心和rspec所需的其他内容。

rspec-rails, which installs core, and others required by rspec.

http://rubydoc.info/gems/rspec-rails/frames

这篇关于rspec总是返回错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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