Well, it seems pretty obvious that I can't use "controller" to mock controller methods in the view specs, but I was assigning a mock for the current logged-in user to the @current_user variable and it worked on rspec 1.1.4
I was doing this: assigns[:current_user] = stub_model(User, :role => "whatever") and I could check the role of the user in the view with current_user.role. Was it correct or I had to do it in another way? Thanks Juanma Cervera -- Posted via http://www.ruby-forum.com/. _______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
