Well, it will work now if you are using rails test runner on the command line. But of course it has to be a Rails app, and specifies Rails version to github master branch.
Here I’m gonna just paste @arhurnn’s example posted on the pull request.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
This is exactly what @tenderlove and also, many other rails developers including me (not fans of RSpec) would want. We don’t have to run a single test with typing
-n test_failing_one manually.
And with the test runner, we could do exact things like we do with rake tasks before.
When we want to run all controller tests from
test/controllers before, we would use a rake task:
rake test:controllers. And now (Rails master branch), just
bin/rails test test/controllers. As @senny explained PR #19216 (comment) here, the first argument after
bin/rails test is just a
directory, rails test runner won’t support fancy pattern convention/matching.
Kudos to @senny and @arthurnn, and let’s look forward the Rails 5 release!