Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/svenfuchs/test_server
Playing around with a test server for Rails that keeps the environment loaded (just like spec_server)
https://github.com/svenfuchs/test_server
Last synced: 12 days ago
JSON representation
Playing around with a test server for Rails that keeps the environment loaded (just like spec_server)
- Host: GitHub
- URL: https://github.com/svenfuchs/test_server
- Owner: svenfuchs
- Created: 2008-11-22T22:07:42.000Z (about 16 years ago)
- Default Branch: master
- Last Pushed: 2009-01-25T23:22:27.000Z (almost 16 years ago)
- Last Synced: 2024-10-26T22:40:50.412Z (2 months ago)
- Language: Ruby
- Homepage:
- Size: 89.8 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.textile
Awesome Lists containing this project
README
h1. test_server
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.
h3. Credits
Heavily inspired by David Chelimsky's "spec_server":http://github.com/dchelimsky/rspec-rails/tree/master/generators/rspec/templates/script/spec_server which was based on Florian Weber's "TDDMate":http://rubyforge.org/projects/tddmate.