Project

tbooster

0.0
No commit activity in last 3 years
No release in over 3 years
Runs unit tests faster by not reloading the testing environment every time
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.6.0
 Project Readme

tbooster

Runs unit tests faster by not reloading the testing environment every time you're running a test. Currently works only with the defailt testing framework( TestUnit )

Usage:

gem install tbooster

when running tests -> replace ruby with tbooster:

tbooster test/unit/users.rb

OR

tbooster test/unit/users.rb -n test_user_exists?

Implementation:

Tbooster comes with an executable file which passes commands (the arguments it received) to a named pipe (found in tmp/tbooster_pipe) and ensures the two runner processes are started.

Runner processes

  • first process loads the ruby testing environment and reads commands received on the named pipe mentioned above.
  • second process listens for file changes (helpers, models, controlers and lib) and sends a reload command to the named pipe when a file was changed.

Processing commands:

  • when a file was changed the command runner process loads that file again so that we have the testing environment up to date with the latest code changes.
  • when a run test command was received we fork the process that holds the most recent testing environment and require the test file that needs to be runned

Issues:

  1. When changing branches in your repository if too many files were changes ree throws an error closing the process that holds the testing environment therefore we'll have to start it again
  2. When reloading a file, constants are assigned again and a warning message will be displayed stating there is already a constant with that name
  3. After a commands was issued you need to hit enter in the console to update the caret position
  4. Reloading a file updates the existing methods or adds new ones. It's not deleting unused methods