Start on backend generator tests by seeing what I have to do pass a test.
Wrap the generate method in unit tests.
Add the routes to a Rails4 app.
Use one statement for adding the routing to the app.
The setup_db method is for rethinkdb only.
Move the database setup to the database object.
Move the "db" reference inside of the database object.
Stop referencing a global config db object everywhere.
Bring the setup within the database object.
Rename common db setup.
Consolidate how the database is accessed.
Fix refactored method name.
Bind the tests to a test config.
Add a first test for the hardcoded test environment config.
Determine which config to use based on the environment.
Simplify the tests.
Verify that the database is created only once.
Consider if the environment variable is not set.
Default to the old way of doing config, if no other ways exist.
Fix test config.