-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined local variable or method `last_response' #12
Comments
Variable `example` is now passed into hooks in RSpec 3.x; Also include `Rack::Test::Methods` which fixes calderalabs#12
+1 |
Is this abandoned? |
@kurtisnelson I got colab access, but I'm short on time right now. I'll be glad to merge PRs, though. Would you have some available time to fix this? |
I've switched to using the tools to verify my blueprint instead. |
Hi! The error may occur because some of the spec helpers you use do follow different convention to store the response (e.g. setting Try inserting I ran into the exactly opposite scenario: Airborne was expecting before(:all) do
get '/example' # does set last_response
# make Airborne happy :)
@response = last_response
end
it "says hello" do
expect_json({ hello: "world" }) # was triggering the error
end Hence the suggestion. Regards! |
I also have ran into this issue. @gonzalo-bulnes your suggestion doesn't work for me. |
I have exactly the same issue as everyone, and same as @alexfu , that suggestion does not work for me. Any update? |
According to some sources, adding this line to the spec_helper's Rspec's configuration block is a solution. But I only get a new error then.
My new issue:
|
I have tried the same thing as @shideneyu and I'm running into the same error:
|
If you have some time, try debugging and opening a PR and I'll gladly merge it. I'm not working on a project with this gem at the moment. |
+1 |
2 similar comments
+1 |
+1 |
I've found that this fork works well: https://github.com/drewcimino/rspec_api_blueprint |
Hi, I'm trying use this gem to generate a blueprint.
When I execute bundle exec rspec, show this error:
undefined local variable or method `last_response' for #RSpec::ExampleGroups::UsersRequests::GETApiUsers:0x007fafa6bde540
I'm using Rails 4.1.4, Rspec 3.0.0
The text was updated successfully, but these errors were encountered: