spec/support/views_helper.rb in portier-1.0.3 vs spec/support/views_helper.rb in portier-1.1.0
- old
+ new
@@ -2,11 +2,13 @@
def app_mock(options={})
options.reverse_merge! controller: 'products', action: 'index', params: {}
app = double()
- app.stub(:request).and_return({ controller: options[:controller], action: options[:action] })
- app.stub(:params).and_return(options[:params])
+ allow(app).to receive_messages(
+ request: { controller: options[:controller], action: options[:action] },
+ params: options[:params]
+ )
return app
end
end