Engines are a new feature within Rails 3 which allows for code such as that found in models and controllers to be shared in gems across applications. You may be familiar with the Devise gem, which is a very advanced engine. In this guide we cover how the foundation for the forem
engine was laid.
A lot of people have been saying there's no real documentation or examples for Rails engines at the moment and that somebody should do something about it. Coincidentally, Rails 3 in Action will (eventually) have a chapter on creating an engine which will go into more detail than this guide, but this guide should help you get set up with an engine, as well as showing one setup of testing which uses RSpec + Capybara.
Hopefully this post can give you a nice kickstart on developing your own engine and you can learn from what we've gone through.
To begin with, I'm going to assume that you've got