2011-10-24 13:49:37 -04:00
|
|
|
require './spec/support/samples/application_helper'
|
|
|
|
|
2011-10-08 01:37:33 -04:00
|
|
|
module ActionController
|
|
|
|
class Base
|
|
|
|
@@before_filters = []
|
|
|
|
def self.before_filters
|
|
|
|
@@before_filters
|
|
|
|
end
|
|
|
|
def self.before_filter(name)
|
|
|
|
@@before_filters << name
|
|
|
|
end
|
2011-10-28 22:20:28 -04:00
|
|
|
def self.helper(mod)
|
|
|
|
extend mod
|
|
|
|
end
|
2011-10-08 01:37:33 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class ApplicationController < ActionController::Base
|
2011-07-23 09:59:09 -04:00
|
|
|
extend ActionView::Helpers
|
|
|
|
extend ActionView::Helpers::TagHelper
|
|
|
|
extend ActionView::Helpers::UrlHelper
|
2011-10-08 01:06:19 -04:00
|
|
|
extend ApplicationHelper
|
|
|
|
|
2011-10-08 01:37:33 -04:00
|
|
|
def view_context
|
|
|
|
@view_context ||= ApplicationController
|
2011-10-08 01:06:19 -04:00
|
|
|
end
|
|
|
|
|
2011-10-08 01:37:33 -04:00
|
|
|
def view_context=(input)
|
|
|
|
@view_context = input
|
2011-10-08 01:06:19 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def self.hello
|
|
|
|
"Hello!"
|
2011-07-23 09:59:09 -04:00
|
|
|
end
|
2011-10-28 22:20:28 -04:00
|
|
|
|
|
|
|
def self.capture(&block)
|
|
|
|
@@capture = true
|
|
|
|
block.call
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.capture_triggered
|
|
|
|
@@capture ||= false
|
|
|
|
end
|
2011-10-08 01:06:19 -04:00
|
|
|
end
|
|
|
|
|
2011-10-24 13:49:37 -04:00
|
|
|
Draper::System.setup
|