Adam in Projects, Programming, Technology | June 6, 2008 Rails rake command to run a single unit test Q: What is the rake command to run a single rails unit test?A: There is none, use ruby test/unit/my_test.rb AdamPublishedJune 6, 2008
Not true, to invoke the rails environment, use: rake test TEST=/path/to/test (i.e. rake test TEST=test/unit/accounts.rb) Reply to Chris
in my rails 2.3.2 environment rake test TEST=/path/to/test runs the test three timesBut rake test:units TEST=/path/to/test works fine. Reply to olivander
Not true, to invoke the rails environment, use:
rake test TEST=/path/to/test (i.e. rake test TEST=test/unit/accounts.rb)
in my rails 2.3.2 environment
rake test TEST=/path/to/test
runs the test three times
But
rake test:units TEST=/path/to/test
works fine.