I just upgraded from Rspec 2.99 to Rspec 3 and am getting the following error for some of my tests.
Failure/Error: Unable to find matching line from backtrace
ArgumentError:
comparison of Symbol with Module failed
I have the following controller test
require 'spec_helper'
describe PeopleController, type: :controller do
subject { response }
describe :index do
before { get :index }
it { should_not be_success }
it { should have_http_status '401' }
end
end
Any idea what might be causing the error?
You can't use symbols after describe
anymore. You need to replace
describe :index do
with
describe 'index' do
You are however able to use symbols as tags, for example...
describe 'index', :awesome do
...
end
Now when running the tests you can target only tests with a certain tag.
$ rspec --tag awesome
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