I wonder how this worked under RSpec 1.3. My current best guess is
On Jan 13, 5:14 pm, "Kurt S." <
k...@cissor.com> wrote:
> Hi -- We're having problems with specs that ran great in Rails 2.3.8 and
> RSpec 1.3.x but are failing now that we have upgraded to Rails 3.0.3 and
> RSpec 2.4. The problem occurs when we call permitted_to? in the view -- it
> can't find the method current_user, even though we have defined it in our
> ApplicationController per the documentation. Note that this configuration
> and specs worked fine before, and we haven't changed anything except the
> Rails and RSpec versions. We're on 0.5.2 of the gem. Any suggestions
> appreciated.
>
> P.S. This gem has worked great for our security needs...
>
> Here is a dump of the error:
>
> 19) /team_members/show manage team members should allow managers of team
> members to read zip
> Failure/Error: render
> ActionView::Template::Error:
> undefined local variable or method `current_user' for
> #<ActionView::TestCase::TestController:0x103822dd8>
> #
> /Users/kurtsnyder/.rvm/gems/ree-1.8.7-2010.02@rails3/gems/declarative_autho rization-0.5.2/lib/declarative_authorization/in_controller.rb:81:in
> `has_role?'
> #
> /Users/kurtsnyder/.rvm/gems/ree-1.8.7-2010.02@rails3/gems/declarative_autho rization-0.5.2/lib/declarative_authorization/helper.rb:52:in