Re: [rspec-users] how to test this view with Rspec

2009-03-14 Thread Thomas R. Koll
Am 14.03.2009 um 14:12 schrieb Zhenning Guan: = flash_messages - @user = User.find(1) move that to the controller or a helper. always. and if you try to find the admin with that, add a flag on the user so you can write current_user.admin? > - @forum.each do |f| > .group > = link_to f.

[rspec-users] how to test this view with Rspec

2009-03-14 Thread Zhenning Guan
= flash_messages - @user = User.find(1) - if current_user == @user %new_forum= link_to 'new forum', new_forum_path - @forum.each do |f| .group = link_to f.name, forum_path(f) - if current_user == @user = link_to 'edit', edit_forum_path(f) = link_to 'destroy', forum_path(f),