Functional Test `stringify_keys' issue
Opened this issue · 2 comments
#95 NOT WORKS FOR ME!
When I try to do a simple functional test like:
require 'test_helper'
class Admin::EventsControllerTest < ActionController::TestCase
include Devise::TestHelpers
setup do
@event = events(:one)
@user = users(:a007)
sign_in @user
end
test "should get index" do
get_with(@user, :index, nil, session)
assert_response :success
assert_not_nil assigns(:events)
end
I get a erro like this:
NoMethodError: private method `stringify_keys' called for #<ActionController::TestSession:
I added on test_helper.rb:
include Authorization::TestHelper # Declarative Authorization
My ruby version is 1.9.3, rails: 3.2.8, declarative_authorization: 0.5.6, devise: 2.1.0, rake: 10.0.1, rack: 1.4.1.
may some one help me?
Can you post a full stack trace? Where is stringify_keys called, in Authorization::TestHelper?
I'm not calling stringify_keys directly.
Error:
test_should_get_index(Admin::EventsControllerTest):
NoMethodError: private method stringify_keys' called for #<ActionController::TestSession:0x00000003be9aa8> /home/cajuina/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_controller/test_case.rb:222:in
initialize'
/home/cajuina/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_controller/test_case.rb:461:in new' /home/cajuina/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_controller/test_case.rb:461:in
process'
/home/cajuina/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_controller/test_case.rb:49:in process' /home/cajuina/.rvm/gems/ruby-1.9.3-p194/gems/devise-2.1.0/lib/devise/test_helpers.rb:19:in
block in process'
/home/cajuina/.rvm/gems/ruby-1.9.3-p194/gems/devise-2.1.0/lib/devise/test_helpers.rb:71:in catch' /home/cajuina/.rvm/gems/ruby-1.9.3-p194/gems/devise-2.1.0/lib/devise/test_helpers.rb:71:in
_catch_warden'
/home/cajuina/.rvm/gems/ruby-1.9.3-p194/gems/devise-2.1.0/lib/devise/test_helpers.rb:19:in process' /home/cajuina/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_controller/test_case.rb:386:in
get'
/home/cajuina/.rvm/gems/ruby-1.9.3-p194/gems/declarative_authorization-0.5.6/lib/declarative_authorization/maintenance.rb:191:in block in request_with' /home/cajuina/.rvm/gems/ruby-1.9.3-p194/gems/declarative_authorization-0.5.6/lib/declarative_authorization/maintenance.rb:46:in
with_user'
/home/cajuina/.rvm/gems/ruby-1.9.3-p194/gems/declarative_authorization-0.5.6/lib/declarative_authorization/maintenance.rb:40:in with_user' /home/cajuina/.rvm/gems/ruby-1.9.3-p194/gems/declarative_authorization-0.5.6/lib/declarative_authorization/maintenance.rb:187:in
request_with'
/home/cajuina/.rvm/gems/ruby-1.9.3-p194/gems/declarative_authorization-0.5.6/lib/declarative_authorization/maintenance.rb:207:in get_with' /home/cajuina/Projects/Ruby/Rails/mesorteia/test/functional/admin/events_controller_test.rb:16:in
block in class:EventsControllerTest'