rails/rails — pull request #6012 by avakhov (2012-04-27 07:50:16+00:00)
Title: Cover Rails::DBConsole with tests

Add tests for Rails::DBConsole. I tried to not modify original code, but I should add such changes:
* extract `find_cmd` from body of `start` method (I think to put one method to another was just misprint)
* Wrap global `ENV` changes (to not polute ENV in tests)
* Wrap system `exec`

I executed all tests also and check `rails db` with edge rails works well.

\cc @drogus
Piotr, I see that you covered Rails::Console with tests. What do you think about my commit? I want to suggest some fix in Rails commands, but it's better to test existing code before. If it looks fine I'll add tests for all command also.