Module: Viewtastic::TestCase

Includes:
Authlogic::TestCase
Defined in:
lib/viewtastic/test_case.rb

Instance Method Summary collapse

Instance Method Details

#activate_viewtasticObject



5
6
7
8
9
10
11
12
13
# File 'lib/viewtastic/test_case.rb', line 5

def activate_viewtastic
  if @request && ! @request.respond_to?(:params)
    class <<@request
      alias_method :params, :parameters
    end
  end

  Viewtastic::Base.controller = (@request && Authlogic::TestCase::RailsRequestAdapter.new(@request)) || controller
end