def setup_rack_application(application, options = {}, mixpanel_options = {}) stub!(:app).and_return(Mixpanel::Middleware.new(application.new(options), MIX_PANEL_TOKEN, mixpanel_options)) end def html_document <<-EOT
EOT end class DummyApp def initialize(options) @response_with = {} @response_with[:status] = options[:status] || "200" @response_with[:headers] = options[:headers] || {} @response_with[:body] = options[:body] || "" end def call(env) [@response_with[:status], @response_with[:headers], [@response_with[:body]]] end end def large_script <<-EOT