Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion View spec problem (RSpec 2)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Kurt S.  
View profile  
 More options Jan 13 2011, 8:14 pm
From: "Kurt S." <k...@cissor.com>
Date: Thu, 13 Jan 2011 17:14:50 -0800 (PST)
Local: Thurs, Jan 13 2011 8:14 pm
Subject: View spec problem (RSpec 2)

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
`has_role?'
     # ./app/views/team_members/show.html.haml:8:in
`_app_views_team_members_show_html_haml___975676147_2176431740_0'


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.