[rspec-users] cucumber is_admin? testing

Alex Whiteland lists at ruby-forum.com
Wed Nov 23 12:55:04 EST 2011


> that is added to cucumber's world does not have access to your
> application
> controller's @current_user variable.

So, I understand this. But how I can avoid this defect?

If I paste def is_admin? into application_controller near current_user 
method, I wouldn't can World(ApplicationController). If I copy 
current_user  code to sessions_helper, then session[:user_id] wouldn't 
work.

-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list