test/spec_session_memcache.rb in rack-1.4.1 vs test/spec_session_memcache.rb in rack-1.4.2

- old
+ new

@@ -1,7 +1,8 @@ begin require 'rack/session/memcache' + require 'rack/lint' require 'rack/mock' require 'thread' describe Rack::Session::Memcache do session_key = Rack::Session::Memcache::DEFAULT_OPTIONS[:key] @@ -9,25 +10,26 @@ incrementor = lambda do |env| env["rack.session"]["counter"] ||= 0 env["rack.session"]["counter"] += 1 Rack::Response.new(env["rack.session"].inspect).to_a end - drop_session = proc do |env| + drop_session = Rack::Lint.new(proc do |env| env['rack.session.options'][:drop] = true incrementor.call(env) - end - renew_session = proc do |env| + end) + renew_session = Rack::Lint.new(proc do |env| env['rack.session.options'][:renew] = true incrementor.call(env) - end - defer_session = proc do |env| + end) + defer_session = Rack::Lint.new(proc do |env| env['rack.session.options'][:defer] = true incrementor.call(env) - end - skip_session = proc do |env| + end) + skip_session = Rack::Lint.new(proc do |env| env['rack.session.options'][:skip] = true incrementor.call(env) - end + end) + incrementor = Rack::Lint.new(incrementor) # test memcache connection Rack::Session::Memcache.new(incrementor) it "faults on no connection" do