Skip to content

Instantly share code, notes, and snippets.

@Bill
Created April 14, 2009 23:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bill/95498 to your computer and use it in GitHub Desktop.
Save Bill/95498 to your computer and use it in GitHub Desktop.
module Spec
module Rails
class ControllerContext < Rails::Context
module ContextEvalInstanceMethods
def setup_extra
(class << @controller; self; end).class_eval do
include ControllerInstanceMethods
end
@controller.integrate_views! if @integrate_views
@controller.session = session
#extend the controller instance with simply_helpful modules
@controller.extend SimplyHelpful::RecordIdentificationHelper
@controller.class.helper SimplyHelpful::RecordIdentificationHelper, SimplyHelpful::RecordTagHelper
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment