$ rspec-jumpstart -h
Usage: rspec-jumpstart [options]
-f Create if absent or append to the existing spec
--force
-n Dry run mode (shows generated code to console)
--dry-run
-r Run in Rails mode
--rails
-o VAL Output directory (default: ./spec)
--output-dir VAL
-D VAL Delta template path (e.g. ./rails_controller_delta.erb)
--delta-template VAL
-F VAL Full template path (e.g. ./rails_controller_full.erb)
--full-template VAL
-v Print version
--version
Output example
Unfortunately, lib/foo/bar_baz.rb has no test. That's too bad...
We use rspec-jumpstart for our clients who need test coverage help before beginning a Rails upgrade.
tjchambers / rspec-jumpstart
RSpec 3 code generator toward existing Ruby code.
rspec-jumpstart
RSpec 3 code generator toward existing Ruby code. This gem will help you working on existing legacy code which has no tests.
Installation
rubygems.org/gems/rspec-jumpstart
Usage
Options
Output example
Unfortunately,
lib/foo/bar_baz.rb
has no test. That's too bad...OK, run
rspec-jumpstart
now!spec/foo/bar_baz_spec.rb
will be created…wow, that's what I was looking for 👏. Will give it a try!
Maybe there's something to generate factory_bot factories from existing models?