Fixing deprecation warning for old rspec style declarations

@fbjork This PR will remove the deprecation warnings while running tests,  caused by the updation of factory girl gem in Real Application.

Please review and merge. Thanks!