upgrade rspec to 3.0
File.exists? is deprecated
refactor this method to avoid a ruby warning on 2.1

* warning: unknown unpack directive '*' in 'H2*'
avoid shadowing a variable
remove variable a ssignment that isn't used
avoid using an instance variable that doesn't exist