Just playing …
You might be able to install this as a plugin and then:
- start the server:
vendor/plugins/test_server/bin/server
- run some tests:
vendor/plugins/test_server/bin/test --pattern=[pattern]
- run some specs:
vendor/plugins/test_server/bin/spec spec
The default pattern used for test is test//_test.rb. The spec script uses the default RSpec option parser and runner so you can use whatever you’d use with the spec command.
The environment is loaded only once while the server is up. It will not be loaded when the server starts but when you first run some tests. This is so the server is immediately available. Not sure if that makes so much sense but it seems more convenient to me :)
Subsequent runs of your testsuite then won’t load the environment any more which usually makes them run much faster in total.
Heavily inspired by David Chelimsky’s spec_server which was based on Florian Weber’s TDDMate.