I am working on a few tests and each time I am running them I receive the following warning:
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
I have the latest version 2.6.1 of RSpec installed so I am unsure why this warning is appearing. Can anyone shed some light on this matter and how I might go about removing it.
Thanks JP
The problem is most likely in spec/spec_helper.rb
, which is probably required by your spec. The top-level module is now called RSpec
with a capital S. For your question, you must have typed some of the error message by hand instead of copy-and-pasting it. Your spec_helper should look something like this:
# spec/spec_helper.rb
RSpec.configure do |config|
...
end
I came across this error by using guard. I simply had to change
guard 'rspec', :version => 2 do
to
guard 'rspec' do
in the Guardfile
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With