2011-04-03 23:59:41 +00:00
|
|
|
module Locomotive
|
|
|
|
class TestController < ApplicationController
|
|
|
|
|
|
|
|
include Locomotive::Render
|
|
|
|
|
2011-11-04 15:55:51 +00:00
|
|
|
attr_accessor :output, :status, :current_site, :current_locomotive_account
|
2011-04-03 23:59:41 +00:00
|
|
|
|
|
|
|
def render(options = {})
|
|
|
|
self.output = options[:text]
|
|
|
|
self.status = options[:status]
|
|
|
|
end
|
|
|
|
|
|
|
|
def response
|
|
|
|
@_response ||= TestResponse.new
|
|
|
|
end
|
|
|
|
|
|
|
|
def request
|
|
|
|
@_request ||= TestRequest.new
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
class TestResponse < ActionDispatch::TestResponse
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
class TestRequest < ActionDispatch::TestRequest
|
|
|
|
|
|
|
|
attr_accessor :fullpath
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|