Skip to content

Improve `rspec --init`.

gitlab-qa-bot requested to merge rspec-init into master

Created by: myronmarston

  • Add lots more suggested settings to spec_helper.rb to give a great initial experience.
  • Add a cucumber scenario that demonstrates that the settings generated by rspec --init are all valid. It doesn't demonstrate that they do what they are intended to do, but it protects against misspelled settings and whatnot.
  • Remove old cruft.
  • Put the init contents in their own files. Much cleaner than using heredocs.

I'd like some 👀 on this to see what others think about all the settings this adds. Is this overkill? I think it'll make for a better starting experience to have more in the generated spec_helper.rb file. Are there any settings I've added that shouldn't be included? Anything I'm missing?

It would also be good to find a way to allow rspec-rails' generator to leverage this and build on top of it for the additional rails-specific stuff it adds. I'm not sure of the best way to do that, though.

/cc @alindeman @JonRowe @xaviershay @soulcutter @samphippen

Merge request reports