module Lookout::Rack::Methods

Methods added to [Lookout](disu.se/software/lookout)’s expectations and expect block context’s.

Private Instance Methods

session() click to toggle source

@return [Session] A new session object that wraps the global Rack app found

in the file “fixtures/config.ru” or “config.ru” in the top-level project
directory.
# File lib/lookout-rack-1.0/methods.rb, line 10
def session
  @app ||= begin
             Rack::Builder.parse_file('fixtures/config.ru')
           rescue Errno::ENOENT
             Rack::Builder.parse_file('config.ru')
           end[0]
  Lookout::Rack::Session.new(@app)
end