问题描述
在测试spec/controller文件时,后台的private方法,我使用跟以action提交方式的方法去测试,我本机不报错,但是同事的报错,错误如下:ActionController::UnknownAction in 'ConfigurationsController GET 'set_departments''No action responded to set_departments. Actions: check_permission, check_special_permission, condition, img_size, index, local_request?, log_exception, m, must_login, params_condition, per_page, rescue_action_in_public, save_levels, save_main, search_condition, selected_district, selected_district_name, set_configuration_departments, set_menu, set_online_user, top, and workitem_attributes_from/home/liweihui/.gem/ruby/1.8/gems/haml-2.0.10/lib/sass/plugin/rails.rb:19:in `process'./spec/controllers/configurations_controller_spec.rb:30:这是为什么? 问题补充:问题已经解决了,是要升级gem,新版本才能测出来,谢谢你的关注
解决方案
信息不太够,问题没解决的话把controller代码和spec代码贴上来看看吧胡猜一个的话 环境一样吗?gem list一样吗?