Make Rspec 3 compliant

Change explicit use of `example` variable to using the block value that
is passed in to examples and before/after hooks.
Correct reference to wrong block variable name
Fix accidental editing error
Merge pull request #1123 from thomas-holmes/update-rspec-configuration

Make Rspec 3 compliant
Revert "Merge pull request #1123 from thomas-holmes/update-rspec-configuration"

This reverts commit c074fe1070fd73fdd8cae99a96fc263bb0e4a31c, reversing
changes made to 61524b0fd32a1fb55b82853bdc4a0293e9fcdef0.