khwon/loco — pull request #44 by yous (2014-08-06 20:21:16+00:00)
Title: Add basic running test

Close #42

- Test for 'off' as id input
- Test for login

Uses `instance_double('User')`, stubs for `User.find_by(username: 'testid')`, `User#try(:authenticate, 'testpw')` and `User#admin?`.
- Add `only_have_processors` matcher

``` ruby
expect(cached_processors).to only_have_processors(%i(
login_menu goodbye_menu
))
```
expects
``` ruby
cached_processors.size == 2 &&
cached_processors[:login_menu].is_a?(LoginMenu) &&
cached_processors[:goodbye_menu].is_a?(GoodbyeMenu)
```
to be true.