Passing the Request Test

Let’s learn how to implement the code to pass the test.

Why did the test fail?

Now, we need to find out why the test is failing.

We could look at the test.log file, but it’s of no help in this case. So, we’ll have to check out the registrations controller. To do that, we’’ll use the generator that Devise provides.

$ rails g devise:controllers users -c=registrations
create  app/controllers/users/registrations_controller.rb

The generator also gives us some code to add into our config/routes.rb file.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy