[Rails] DRY in rspec tests

2011-02-11 Thread S. Widmann
Hi, I've got a lot of rspec controller tests. At the beginning of each controller, I have: def authenticate ... end def logout ... end Authenticates creates me a @current_user, logout destroys the @current_user. As I said, this code is at the beginning of each controller, not very DRY :-)

Re: [Rails] DRY in rspec tests

2011-02-11 Thread Philip Hallstrom
I've got a lot of rspec controller tests. At the beginning of each controller, I have: def authenticate ... end def logout ... end Authenticates creates me a @current_user, logout destroys the @current_user. As I said, this code is at the beginning of each controller, not very