Anyone know how to set the devise helper function #current_user in a controller test (using fixture data) for a Rails 5 app? I've tried the following:
sign_in users(:example_user)@current_user = users(:example_user)current_user = users(:example_user)@controller.stubs(:current_user).returns(users(:example_user)).
I'm writing tests for the paper_trail gem, which uses #current_user to set the 'whodunnit' attribute (i.e. id of current_user) on the version.