Add current_user to Cucumber step definitions

Cucumber provides a great way to apply BDD during your rails development.Sometimes you need to populate your testing database with background data and sometimes you need to access the1current_usermethod.Generally1current_useris a method defined in the1ApplicationControllerclass or in a user related module. So it’s not accessible to Cucumber’s scenarios: let’s add it and share to all step definition’s classes.1Specified fil...

Read more