Ruby Rspec. Get list of all Test

后端 未结 2 2038
被撕碎了的回忆
被撕碎了的回忆 2021-02-14 01:12

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条回答
  • 2021-02-14 01:29

    There used to be a way to do this using the tag --dry-run, but that has been removed and no longer works.

    You can use the -fd which is for format = documentation. This will show you a long list of all the specs that you've done and what they look like. It does, however, still run the test and show you any errors you have in the process. That said it's still a great way to list of all of your tests.

    0 讨论(0)
  • 2021-02-14 01:37
    rspec -f d --color --dry-run filename
    

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

    0 讨论(0)
提交回复
热议问题