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

后端 未结 12 1763
故里飘歌
故里飘歌 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条回答
  •  情书的邮戳
    2020-12-07 10:03

    That was a silly midnight question of mine. Rails kindly prints the command it is executing upon rake test. The rest is a cut and paste exercise.

    ~/projects/rails/actionpack (my2.3.4)$ ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/controller/base_test.rb"
    

提交回复
热议问题