Sha256: 1841ac32699d449008dc54d9f78d110e9bc73680863c66b3a2ce59df232218fa

Contents?: true

Size: 280 Bytes

Versions: 6

Compression:

Stored size: 280 Bytes

Contents

require "webrat/rack"

module Webrat
  class SinatraSession < RackSession
    def initialize(context)
      app = context.respond_to?(:app) ? context.app : Sinatra::Application

      super(Rack::Test::Session.new(Rack::MockSession.new(app, "www.example.com")))
    end
  end
end

Version data entries

6 entries across 6 versions & 4 rubygems

Version Path
hardbap-webrat-0.5.1 lib/webrat/sinatra.rb
hardbap-webrat-0.5.2 lib/webrat/sinatra.rb
winton-sum-0.1.0 vendor/webrat/lib/webrat/sinatra.rb
winton-sum-0.1.1 vendor/webrat/lib/webrat/sinatra.rb
sum-0.1.1 vendor/webrat/lib/webrat/sinatra.rb
webrat-0.5.0 lib/webrat/sinatra.rb