Updated rails
Added a mocha spec and made it pass