2010-04-12 23:33:25 +00:00
|
|
|
Locomotive.configure do |config|
|
|
|
|
config.default_domain = 'example.com'
|
2010-05-30 23:57:33 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
module Locomotive
|
|
|
|
class TestController
|
|
|
|
|
|
|
|
include Locomotive::Render
|
|
|
|
|
2010-06-01 00:06:46 +00:00
|
|
|
attr_accessor :output, :current_site, :current_account
|
2010-05-30 23:57:33 +00:00
|
|
|
|
|
|
|
def render(options = {})
|
|
|
|
self.output = options[:text]
|
|
|
|
end
|
|
|
|
|
|
|
|
def response
|
|
|
|
@response ||= TestResponse.new
|
|
|
|
end
|
|
|
|
|
|
|
|
def request
|
|
|
|
@request ||= TestRequest.new
|
|
|
|
end
|
2010-06-01 00:06:46 +00:00
|
|
|
|
2010-05-30 23:57:33 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
class TestResponse
|
|
|
|
|
|
|
|
attr_accessor :headers
|
|
|
|
|
|
|
|
def initialize
|
|
|
|
self.headers = {}
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
class TestRequest
|
|
|
|
|
|
|
|
attr_accessor :fullpath
|
|
|
|
|
|
|
|
end
|
2010-04-12 23:33:25 +00:00
|
|
|
end
|