Ruby 2.2 useful methods

We recently have switched one of our apps to Ruby 2.2 and I did not know what exactly is behind it so I decided to do a research and learn something new. A detailed list of changes introduced in version 2.2 can be found in Github.

 

RSpec Mocks and `instance_double`

RSpec is a testing framework for Behaviour Driven Development that is composed of multiple libraries. In my current job, for testing Ruby on Rails application, we use rspec-rails gem that installs also all other libraries: rspec-core, rspec-exceptations, rspec-mocks and rspec-support.