Set Rails version 4.0.0
Fix rspec errors
Fix deprecated method of rspec