-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
Summary
If you use the words request
or response
for a variable in your tests, rspec-openapi
will not work. I know these are preassigned words in rspec
itself, but the use of them as variables does not break rspec
, so I wouldn't expect it to break rspec-openapi
.
Reproduction
...
describe "#index" do
subject { get :index }
before do
allow(SomeThirdPartyGem).to receive(:call).and_return(response)
end
let(:response) { double(ThirdPartyGemResponse, body: "This succeeded", code: 200) }
it "renders the index successfully" do
expect(subject.status).to eq(200)
end
end
When just running the test, rspec
succeeds fine. When running openapi-rspec
:
\e[1mFailure/Error: \e[0mexample.run
#<Double ThirdPartyGemResponse> received unexpected message :status with (no args)
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed