Running individual tests in Rails

how-to
Dec 17, 20121 min

Every now and again, I find myself struggling to remember how to execute a single test in Rails. While I have Guard running the entire test suite anytime a change is detected, there are times when I want to focus solely on one test. Accordingly, Flavio Castelli has a great blog entry detailing the manifold ways one can execute a single test using Rake and/or Ruby.

andrew_glover

When Andrew Glover isn't listening to “Funkytown” or “Le Freak” he enjoys speaking on the No Fluff Just Stuff Tour. He also writes articles for multiple online publications including IBM's developerWorks and O'Reilly’s ONJava and ONLamp portals. Andrew is also the co-author of Java Testing Patterns, which was published by Wiley in September 2004; Addison-Wesley’s Continuous Integration; and Manning’s Groovy in Action.

More from this author