RSpec is great for writing tests in
ruby, providing a nice DSL for testing expected behaviour. However, as a test suite grows, you may find yourself writing a lot of boiler plate and even duplicating specs. RSpec’s
shared_examples_for can be a good way to DRY up some of these cases. I couldn’t find much documentation on using it, so wrote a short about it.
Right out of the box, Rails makes setting up your site for different languages very easy. Here’s how to setup
I18n internationalization for your emails as well.
In a recent rails project I’ve been using a gem called wisper that provides publish-subscribe capabilities to ruby objects. I’ve been very happy with how it de-cluttered my callbacks, tidied up my models and moved it all into background jobs.