如何在rspec中为私有方法编写测试用例?

时间:2019-08-08 11:08:39

标签: rspec

map是私有方法 发生错误:
找不到HomepagesController的操作“地图”

context '#map' do
it "Markers" do
  dish = Dish.where("name LIKE ?", "chicken%")
  get :map, { :params => {:name => 'chicken'}}
  controller.params[:name].should eql 'chicken'
end

结束

0 个答案:

没有答案