14

To run a single test in Rails, we normally do:

rails test TEST=test/system/invitation_test.rb

But that doesn't work with system tests. Neither do this work:

rails test:system TEST=test/system/invitation_test.rb

With both those commandos above, all system tests (files) are run.

So my question is, how can I run a single system test?


As a side note, to run (all) system tests in Rails, you need to append :system to test.

rails test:system
Fellow Stranger
  • 32,129
  • 35
  • 168
  • 232

1 Answers1

22

While rails test doesn't seem to work if you want to run your system tests (you need to append test with :system), if you only want to run a single test it does seem to work:

rails test test/system/my_little_test.rb
Fellow Stranger
  • 32,129
  • 35
  • 168
  • 232