RSpec - Undefined method `key?'
问题 I'm trying to run a test for rendering templates and ran into the error: undefined method `key?' for 1014:Fixnum The stub of my model's instance works as it should in my route tests but not so much here. What am I doing wrong? describe RestaurantsController do let(:restaurant) { FactoryGirl.build_stubbed(:restaurant) } describe 'GET #show' do before { get :show, restaurant.id } it { should render_template('show') } end end Full Error 1) RestaurantsController GET #show Failure/Error: before {