module OmniAuth::Test::StrategyTestCase

def app

def app
  strat = strategy
  resp = app_response
  Rack::Builder.new do
    use(OmniAuth::Test::PhonySession)
    use(*strat)
    run lambda { |env| [404, {'Content-Type' => 'text/plain'}, [resp || env.key?('omniauth.auth').to_s]] }
  end.to_app
end

def app_response

def app_response
  nil
end

def session

def session
  last_request.env['rack.session']
end

def strategy

def strategy
  error = NotImplementedError.new('Including specs must define #strategy')
  raise(error)
end