lib/spec/rails/example/helper_example_group.rb in dchelimsky-rspec-rails-1.1.99.9 vs lib/spec/rails/example/helper_example_group.rb in dchelimsky-rspec-rails-1.1.99.13

- old
+ new

@@ -32,34 +32,20 @@ class HelperExampleGroup < FunctionalExampleGroup tests HelperExampleGroupController attr_accessor :output_buffer class HelperObject < ActionView::Base + def initialize(*args) + @template = self + super + end def protect_against_forgery? false end - def session=(session) - @session = session - end + attr_writer :session, :request, :flash, :params, :controller - def request=(request) - @request = request - end - - def flash=(flash) - @flash = flash - end - - def params=(params) - @params = params - end - - def controller=(controller) - @controller = controller - end - private attr_reader :session, :request, :flash, :params, :controller end class << self @@ -111,10 +97,10 @@ # Reverse the load order so that custom helpers which are defined last # are also loaded last. ActionView::Base.included_modules.reverse.each do |mod| include mod if mod.parents.include?(ActionView::Helpers) end - + before(:each) do @controller.request = @request @controller.url = ActionController::UrlRewriter.new @request, {} # url_for @flash = ActionController::Flash::FlashHash.new