How do I generate a controller spec using rspec?
the rspec way is rails g rspec:controller passwords it gives create spec/controllers/passwords_controller_spec.rb –Update You can configure your application to generate rspec when model or controller is created. Add to config/application.rb # don’t generate RSpec tests for views and helpers. config.generators do |g| g.test_framework :rspec, fixture: true g.fixture_replacement :factory_girl, dir: ‘spec/factories’ g.view_specs false g.helper_specs false end … Read more