lib/draper/test/rspec_integration.rb in draper-0.15.0rc1 vs lib/draper/test/rspec_integration.rb in draper-0.15.0

- old
+ new

@@ -13,13 +13,10 @@ :file_path => /spec[\\\/]decorators/ } # Specs tagged type: :decorator set the Draper view context config.before :type => :decorator do - ApplicationController.new.set_current_view_context - Draper::ViewContext.current.controller.request ||= ActionController::TestRequest.new - Draper::ViewContext.current.request ||= Draper::ViewContext.current.controller.request - Draper::ViewContext.current.params ||= {} + Draper::ViewContext.infect!(self) end config.before :type => :view do controller.set_current_view_context end