You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.
I've got two controllers that only have load_and_authorize_resource (no other actions defined). These were working a while back, but I've been rebuilding the app (switching to factories from fixtures among other things). These two controllers haven't been touched in this process, but now I get the following error message:
Error:
IndustriesControllerTest#test_should_create_industry:
AbstractController::ActionNotFound: The action 'create' could not be found for IndustriesController
/Users/jlee/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.14/lib/abstract_controller/base.rb:116:in process' /Users/jlee/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.14/lib/abstract_controller/rendering.rb:45:inprocess'
/Users/jlee/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.14/lib/action_controller/metal/testing.rb:17:in process_with_new_base_test' /Users/jlee/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.14/lib/action_controller/test_case.rb:490:inprocess'
/Users/jlee/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.14/lib/action_controller/test_case.rb:54:in process' /Users/jlee/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.14/lib/action_controller/test_case.rb:412:inpost'
/Users/jlee/Documents/Work/InfoSynergetics/limspec/test/functional/industries_controller_test.rb:27:in block (2 levels) in <class:IndustriesControllerTest>' /Users/jlee/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.14/lib/active_support/testing/assertions.rb:55:inassert_difference'
/Users/jlee/Documents/Work/InfoSynergetics/limspec/test/functional/industries_controller_test.rb:26:in `block in class:IndustriesControllerTest'
The test that is triggering this is:
test "should create industry" do
assert_difference('Industry.count') do
post :create, industry: { indName: 'Test Industry' }
end
I have the exact same issue with another controller (I'm still cleaning up tests so I haven't been through all of the controllers yet). I realize that I arguably shouldn't be testing standard REST actions, but I since this used to work, I'd like to figure out why it isn't...
CanCan version is 1.6.10
The text was updated successfully, but these errors were encountered:
Same problem over here. Tested with a blank Rails 3.2.16 project with a blank controller, and no create action found.
Tried to revert cancan versions all the way down to 1.4.0, but the problem persisted.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I've got two controllers that only have load_and_authorize_resource (no other actions defined). These were working a while back, but I've been rebuilding the app (switching to factories from fixtures among other things). These two controllers haven't been touched in this process, but now I get the following error message:
IndustriesControllerTest#test_should_create_industry:
AbstractController::ActionNotFound: The action 'create' could not be found for IndustriesController
/Users/jlee/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.14/lib/abstract_controller/base.rb:116:in
process' /Users/jlee/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.14/lib/abstract_controller/rendering.rb:45:in
process'/Users/jlee/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.14/lib/action_controller/metal/testing.rb:17:in
process_with_new_base_test' /Users/jlee/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.14/lib/action_controller/test_case.rb:490:in
process'/Users/jlee/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.14/lib/action_controller/test_case.rb:54:in
process' /Users/jlee/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.14/lib/action_controller/test_case.rb:412:in
post'/Users/jlee/Documents/Work/InfoSynergetics/limspec/test/functional/industries_controller_test.rb:27:in
block (2 levels) in <class:IndustriesControllerTest>' /Users/jlee/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.14/lib/active_support/testing/assertions.rb:55:in
assert_difference'/Users/jlee/Documents/Work/InfoSynergetics/limspec/test/functional/industries_controller_test.rb:26:in `block in class:IndustriesControllerTest'
The test that is triggering this is:
test "should create industry" do
assert_difference('Industry.count') do
post :create, industry: { indName: 'Test Industry' }
end
end
I have the exact same issue with another controller (I'm still cleaning up tests so I haven't been through all of the controllers yet). I realize that I arguably shouldn't be testing standard REST actions, but I since this used to work, I'd like to figure out why it isn't...
CanCan version is 1.6.10
The text was updated successfully, but these errors were encountered: