How can I get Rspec to run all tests nested under a folder?

Rspec should already look recursively through the directory you named and find all tests. Note however, that it’s looking for files ending in _spec.rb. Maybe some of your files are not named correctly?

If you need to be more specific about which files it should find, you can also use the --pattern option. For example: rspec --pattern spec/requests/*_spec.rb. (Option --pattern is equal to -P. Taken from rspec --help)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)