Sha256: cdfd13914a08f0e6e572daabfdc912cdd511a28ec6d2954776c55d8083fc0f6a
Contents?: true
Size: 765 Bytes
Versions: 19
Compression:
Stored size: 765 Bytes
Contents
require_relative "spec_helper" describe "session handling" do include CookieJar it "should give a warning if session variable is not available" do app do |r| begin session rescue Exception => e e.message end end body.must_match("You're missing a session handler, try using the sessions plugin.") end it "should return session if rack session middleware is used" do app(:bare) do use Rack::Session::Cookie, :secret=>'1' route do |r| r.on do (session[1] ||= 'a'.dup) << 'b' session[1] end end end _, h, b = req b.join.must_equal 'ab' _, h, b = req b.join.must_equal 'abb' _, h, b = req b.join.must_equal 'abbb' end end
Version data entries
19 entries across 19 versions & 1 rubygems