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 web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
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)