Run single system test
Asked Answered
T

1

17

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
Tiphany answered 3/4, 2017 at 15:13 Comment(0)
T
24

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
Tiphany answered 5/4, 2017 at 20:39 Comment(1)
I don't know why I didn't think about it before 🍻Mose

© 2022 - 2024 — McMap. All rights reserved.