RSpec已弃用

RSpec已弃用,rspec,rspec2,deprecated,Rspec,Rspec2,Deprecated,我正在进行一些测试,每次运行这些测试时,我都会收到以下警告: DEPRECATION WARNING: you are using a deprecated constant that will be removed from a future version of RSpec. C:/Sites/injixo/spec/views/me_home_spec.rb:1in 'require' *Rspec is deprecated *Rspec is the new top-level m

我正在进行一些测试,每次运行这些测试时,我都会收到以下警告:

DEPRECATION WARNING: you are using a deprecated constant that will
be removed from a future version of RSpec.

C:/Sites/injixo/spec/views/me_home_spec.rb:1in 'require'

*Rspec is deprecated
*Rspec is the new top-level module in RSpec-2
我安装了RSpec的最新版本2.6.1,因此我不确定出现此警告的原因。有谁能解释一下这件事,以及我如何着手消除它

谢谢
JP

问题最有可能出现在
spec/spec\u helper.rb
中,这可能是您的规范所要求的。顶级模块现在称为
RSpec
,带有大写字母S。对于您的问题,您必须手动键入一些错误消息,而不是复制和粘贴它。您的spec_助手应如下所示:

# spec/spec_helper.rb
RSpec.configure do |config|
    ...
end

我是在使用guard时遇到这个错误的。我只是不得不改变

guard 'rspec', :version => 2 do


Guardfile

中,如果警告中指出:!
guard 'rspec' do