We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It sometimes renders an empty string with status 200, or sometimes just raises 404. The app below reproduces the former, though.
The demo is based on Rails5 but I have found this problem on my Rails4 app.
https://github.com/gfx/test_jb (Rails5)
bundle install
bundle exec rspec
will shows:
$ bundle exec rspec F Failures: 1) FoosController#index should eq "[]" Failure/Error: expect(response.body).to eq("[]") expected: "[]" got: "" (compared using ==) # ./spec/controllers/foos_controller_spec.rb:8:in `block (3 levels) in <top (required)>' Finished in 0.06748 seconds (files took 4.92 seconds to load) 1 example, 1 failure Failed examples: rspec ./spec/controllers/foos_controller_spec.rb:5 # FoosController#index should eq "[]"
curl http://localhost:3000/foos.json with rails server does return [] as expected.
curl http://localhost:3000/foos.json
rails server
[]
The text was updated successfully, but these errors were encountered:
@gfx hello Please check my comment in #18. Try to set rspec render_views setting to true:
render_views
true
RSpec.configure do |config| config.render_views = true end
Sorry, something went wrong.
No branches or pull requests
It sometimes renders an empty string with status 200, or sometimes just raises 404. The app below reproduces the former, though.
The demo is based on Rails5 but I have found this problem on my Rails4 app.
How to reproduce it
https://github.com/gfx/test_jb (Rails5)
bundle install
bundle exec rspec
will shows:
curl http://localhost:3000/foos.json
withrails server
does return[]
as expected.The text was updated successfully, but these errors were encountered: