mumbly/openbrewcomp — pull request #1 by cpapazian (2013-12-26 02:26:57+00:00)
Title: Changes to get all tests to pass

Got all tests to pass and the app to run! Yay!!!

Changes are:

- Tests were assuming Award::MAX_ENTRIES was 2, but we set it to nil (no maximum entry per person). Added a class method Award.max_entries (which just returns MAX_ENTRIES) so that I could stub it in test. Also needed to add mocha gem so that stubs would work.
- Changed PurgeOldData class to not inherit ActiveRecord::Base. Before this change, ActiveRecord was trying to find a purge_old_data table, but couldn't find it.
- Added login_as(:testuser1) to a bunch of tests in RegisterControllerTest. This was needed because we added a line to the end of the RegisterController#online that depended on current_user being set. This is safe because that route already required a logged in user.