Ruby Rspec. Get list of all Test

rspec, ruby

Solution

rspec -f d --color --dry-run filename

Works for me in rspec 3.5.2, lists all tests without running them

Problem

I have some test on Rspec, which looks like this: ``` describe "description" do before :each do do_before() end it "something_1" do ... end it "something_2" do ... end end ``` I know that I can get name of current test ("something_1") by using ``` example.description ``` Is there any way to get array of all descriptions in `before :each` area?

Original source