Update RSpec, fix deprecations, fix Ruby warnings

Changes made:
* update to latest version of rspec
* using mock to create test doubles is deprecated and will be removed, switch to double
* stub to create doubles is deprecated, use double directly
* stub! is deprecated and will be removed, use stub instead
* any_number_of_times is deprecated, you either mean at_least(:once) or just use stub
* prevent warnings about method redefintion
* fix block argument warnings
* fix warning about indentation mismatch
* fix uninitalised variable warnings
* remove warning about statement never being reached
* remove potentional ambigious == warnings
* Remove unused local variables, supressing warning
* Assign via accessor rather than unused local var
* fix indentation and supress deprecation message
Merge pull request #148 from JonRowe/fix_warnings_and_deprecations

Upgrade RSpec, Fix Deprecations, Fix Ruby Warnings