Skip to content

Instantly share code, notes, and snippets.

@mlr
Forked from them0nk/rspec_rails_cheetsheet.rb
Last active October 26, 2023 14:32
Show Gist options
  • Select an option

  • Save mlr/6574be720a88800b7883 to your computer and use it in GitHub Desktop.

Select an option

Save mlr/6574be720a88800b7883 to your computer and use it in GitHub Desktop.
Rspec Rails cheatsheet with expect syntax (including capybara matchers)
#Rendering & Redirecting
response.should render_template(:index)
response.should redirect_to(movies_path)
#Matching
response.body.should have_content("Hello world")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment