-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Description
(Sorry for the crazy Dr Seuss issue name - and sorry if this has been reported before, it's very difficult to search for ... )
What Ruby, Rails and RSpec versions are you using?
Ruby version: 2.5.3p105
Rails version: 5.2.2
Rspec version: 3.8
- rspec-core 3.8.0
- rspec-expectations 3.8.2
- rspec-mocks 3.8.0
- rspec-rails 3.8.2
- rspec-support 3.8.0
Observed behaviour
With RSpec as the project-wide default test framework, rails generate generator
always errors out.
$ bin/rails g generator foobar
Running via Spring preloader in process 45230
create lib/generators/foobar
create lib/generators/foobar/foobar_generator.rb
create lib/generators/foobar/USAGE
create lib/generators/foobar/templates
error rspec [not found]
I think this is because there is not a generator spec generator, so the rails generator generator is looking for something that isn't there.
Expected behaviour
A spec/lib/generators/foobar_generator_spec.rb
file is generated with the helpers from spec/support/generators
(run_generator
and friends) available (I guess that would need to be required in spec_helper
by default as well).
Can you provide an example app?
https://github.com/tragiclifestories/rspec-generator-issue