Make Rspec 3 compliant

This pull request isn't ready yet, but is an illustration of the changes that I think need to be made. See #1122.

Change explicit use of `example` variable to using the block value that
is passed in to examples and before/after hooks.