I am attempting to upgrade a project from RSpec 2 to RSpec 3, but it is failing with the following error:
Failure/Error: Unable to find matching line from backtrace
only the `receive` or `receive_messages` matchers are supported with `expect(...).to`, but you have provided: #<RSpec::Matchers::BuiltIn::Equal:0x007f99a974a230>
Here is the line:
expect(last_response.ok?).to be true
This post suggests one need only
require 'rspec/expectations'
include RSpec::Matchers
However, I have done this and it still reports the error. This user also seemed to encounter this issue but has not been able to elicit a solution as of 3/30/2015.
I am using rspec with Sinatra and do not use cucumber or spinach.
Can anyone explain how to resolve this error in RSpec 3? Thanks.