Last active
January 1, 2016 00:09
-
-
Save Martin91/8065063 to your computer and use it in GitHub Desktop.
Run single test example or test case with Rake task or ruby command line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In Rails 3.2.x | |
# You can run a single test based on a file like: | |
rake test TEST=test/functionals/xxx_controller_test.rb | |
# Or even a single test example like: | |
ruby -I 'lib:test' test/functionals/xxx_controller_test.rb -n test_edit_profile_without_login | |
# In Rails 4.x.x | |
# You can run a single test based on a file like: | |
rake test /test/functionals/xxx_controller_test.rb # Notice: We don't need TEST system variable any more! | |
# Or even a single test example like: | |
rake test /test/functionals/xxx_controller_test.rb test_edit_profile_without_login # Notice: We can run a rake task directly instead of ruby command |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment