How to run a single test from a rails test suite?

后端 未结 12 1734
故里飘歌
故里飘歌 2020-12-07 09:09

How can I run a single test from a rails test suite?

rake test ANYTHING seems to not help.

12条回答
  •  Happy的楠姐
    2020-12-07 09:41

    Run a test file:

    rake test TEST=tests/functional/accounts_test.rb
    

    Run a single test in a test file:

    rake test TEST=tests/functional/accounts_test.rb TESTOPTS="-n /paid accounts/"
    

    (From @Puhlze 's comment.)

提交回复
热议问题