Read more

Run a single test in Test::Unit

Henning Koch
August 25, 2010Software engineer at makandra GmbH

To run a single test file:

rake test:units TEST=test/unit/post_test.rb
rake test:functionals TEST=test/functional/posts_controller_test.rb
rake test:integration TEST=test/integration/admin_news_posts_test.rb
Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

You may even run a single test method:

ruby -I test test/unit/post_test.rb -n "name of the test"
ruby -I test test/functional/posts_controller_test.rb -n test_name_of_the_test # underscored, prefixed with 'test_'

Or all tests matching a regular expression:

ruby -I test test/integration/admin_news_posts_test.rb -n "/matching string/"
Posted by Henning Koch to makandra dev (2010-08-25 14:16)