I see you concern and I agree but I don't know how to fix it. This method is called only for actions using resource_base / resource_scope inside. Therefore on all others it will fail with this exception. I don't know how to detect whether some action uses this method or not from outside (test), since it's not even before_filter. It does not make sense to me to set some permission name for every action, if they don't use it. If it ever happens it should at least be very easy to find and fix it.

But if you have some idea, I'd be happy to test it somehow.

Note for me, this would work if we were able to filter correct methods:
```ruby
test "action_permission helper defines permission name for action at #{path}" do
      assert_nothing_raised ::Foreman::Exception do
        controller_instance = controller.new
        controller_instance.stubs(:params).returns({:action => r.defaults[:action]}.with_indifferent_access)
        controller_instance.send :action_permission
      end
end
```