Using the driver of disconnecting HTTP requests from IMAP, Chris, James and I have been working towards adding a message repository. We've been moving slowly and deliberately, trying to introduce classes wherever possible and drive the code through tests.
Introducing a singletonish MessageRespository makes me feel a little uneasy but it was the simplest way I could think to tie everything together. Also, I'm still unsure the role cucumber tests should/do play. Here they are just a simple end-to-end test, which is a useful driver but perhaps not their best purpose?
Finally: 'Fix up look sharp. Don't make me bring the blitz out and get dark.'
We need to be able to import messages from an account via a high-level
method that's suitable for calling from (for example) a Rake task.
We've put this method in `MessageImporter`, but wanted to keep the tests
slightly separate because we weren't 100% sure that it belonged there.
Having written the tests, and with the two `require`s that we've had to
add to `message_importer.rb`, we're now confident that it doesn't belong
in that class; we'll extract it into something else next.
We want to run the app in the production environment on linode but the
asset pipeline is causing us problems because it's expecting
pre-compiled assets to exist, yet recap isn't configured to generate
We're not using any CSS at the moment so the simplest thing to do is
Disabling the asset pipeline broke three of our controller tests. It
would appear that the asset pipeline rack app which is mounted makes
Rails believe that there is a route which will point at the test