Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

Chapter 4, Remove request_specs: false #102

Open
JunichiIto opened this issue Sep 5, 2019 · 0 comments
Open

Chapter 4, Remove request_specs: false #102

JunichiIto opened this issue Sep 5, 2019 · 0 comments

Comments

@JunichiIto
Copy link
Contributor

Chapter 4, the section "Installing Factory Bot", you wrote config/application.rb like this:

    config.generators do |g|
      g.test_framework :rspec,
        view_specs: false,
        helper_specs: false,
        routing_specs: false,
        request_specs: false
    end

However, the line request_specs: false does not exist in the sample code:

https://github.com/everydayrails/everydayrails-rspec-2017/blob/04-factories/config/application.rb#L18-L23

This line is harmful because it prevents from generating request specs. For example, if you execute the command bin/rails g rspec:request projects_api in Chapter 7, it generates nothing without any errors:

$ bin/rails g rspec:request projects_api
Running via Spring preloader in process 97985
$

This behavior is very confusing for the readers. Actually, one of them was in trouble:

https://twitter.com/diveintoganges/status/1049634233184968704

Therefore, I think the line request_specs: false should be removed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant