Tested on Rails 4.2 and migrated to rspec > 3