Sha256: 2c6d148d476bc82adff8fe11808cd1cf2b76c8f54561a9a94b54f4202a383e70
Contents?: true
Size: 831 Bytes
Versions: 20
Compression:
Stored size: 831 Bytes
Contents
require File.expand_path("spec_helper", File.dirname(__FILE__)) describe "session handling" do 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.should =~ /use Rack::Session::Cookie/ end it "should return session if available" do app(:bare) do use Rack::Session::Cookie, :secret=>'1' route do |r| r.on do (session[1] ||= 'a') << 'b' session[1] end end end _, h, b = req b.join.should == 'ab' _, h, b = req('HTTP_COOKIE'=>h['Set-Cookie'].sub("; path=/; HttpOnly", '')) b.join.should == 'abb' _, h, b = req('HTTP_COOKIE'=>h['Set-Cookie'].sub("; path=/; HttpOnly", '')) b.join.should == 'abbb' end end
Version data entries
20 entries across 20 versions & 2 rubygems