Hi, all! I am very new to Ruby and working my way through a course and
have
a reached a point where I cannot figure out what I’m doing wrong.
Here is a link to my project on GitHub
https://github.com/michelleisclever/rails-pinning-app. When running
the
/rspec/controllers/users_controller_spec.rb, I receiving the following:
https://github.com/michelleisclever/rails-pinning-app
Pending: (Failures listed here are expected and do not affect your
suite’s
status)
- UsersController PUT #update with valid params updates the requested
userAdd a hash of attributes valid for your model
./spec/controllers/users_
controller_spec.rb:125
Failures:
- UsersController PUT #update with invalid params re-renders the
‘edit’
template
Failure/Error: expect(response).to render_template(“edit”)
expecting <“edit”> but rendering with <[]>./spec/controllers/users_controller_spec.rb:156:in `block (4
levels)
in <top (required)>’
- UsersController POST login renders the login view if params invalid
Failure/Error: expect(response).to render_template(“login”)
expecting <“login”> but rendering with <[]>./spec/controllers/users_controller_spec.rb:202:in `block (3
levels)
in <top (required)>’
-
UsersController POST login populates the @error variable if params
invalid
Failure/Error: expect(assigns[:errors].present?).to be(true)expected true
got false./spec/controllers/users_controller_spec.rb:209:in `block (3
levels)
in <top (required)>’
Finished in 1.92 seconds (files took 19.08 seconds to load)
20 examples, 3 failures, 1 pending
Failed examples:
rspec ./spec/controllers/users_controller_spec.rb:153 # UsersController
PUT
#update with invalid params re-renders the ‘edit’ template
rspec ./spec/controllers/users_controller_spec.rb:198 # UsersController
POST login renders the login view if params invalid
rspec ./spec/controllers/users_controller_spec.rb:205 # UsersController
POST login populates the @error variable if params invalid