How do I set up controller tests to use requests?

Asked

Viewed 34 times

1

After creating a controller a test for the controller is automatically created. You can disable this test creation for the controller using the code below:

Rails.application.config.generators do |g|
  g.test_framework :rspec, controller_specs: false
end

Once this is done, the normal thing would be to create the request manually. Another idea to solve would be to override the controller generator.

Well, I would like to know if there is any type of configuration that can enable the use of test creation for requirements instead of tests for controllers.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.