running many tests

Skip to first unread message

Joao Miguel Ferreira

Nov 30, 2020, 7:41:19 AM11/30/20
to rspec
Hello all,

I'm just starting with rspec and with ruby. I have read the examples and I can run rspec tests with "ruby my_test.rb".

Is there a way to run many tests? something like a test battery or "please run all tests in my_tests directory" ?

Is there something like "best practices" on this matter?

thank you

Phil Pirozhkov

Nov 30, 2020, 7:57:17 AM11/30/20
to Jack Royal-Gordon

You normally (after running `rspec --init`) add spec files under `spec` directory, and name them something like `user_spec.rb`.

And run either focused to one spec file ( with `rspec spec/my_spec.rb`, or run all your specs with just `rspec`.

All the documentation is available here
I can recommend checking the community RSpec style guide

You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Joao Miguel Ferreira

Nov 30, 2020, 10:04:04 AM11/30/20
to rspec
Hi Phil,

thank you very much

Reply all
Reply to author
0 new messages