Sha256: ca83c2290ea53883320e9883b1f1d05b8868a0ef6310a6dd58c5fab77c10e387
Contents?: true
Size: 542 Bytes
Versions: 2
Compression:
Stored size: 542 Bytes
Contents
require 'rubygems' require 'rack' require 'rack/test' require 'rack/response' require 'yaml' require File.expand_path( File.join( File.dirname(__FILE__), %w[.. lib mongo_rack] ) ) Spec::Runner.configure do |config| end def mongo_check( res, key, val ) session_id = res['Set-Cookie'].match( /^#{@session_key}=(.*?);.*?/ )[1] result = @sessions.find_one( { :_id => session_id } ) result.should_not be_nil ses = YAML.load( result['data'] ) ses[key.to_s].should == val end def clear_sessions @sessions.remove() end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mongo_rack-0.0.4 | spec/spec_helper.rb |
mongo_rack-0.0.3 | spec/spec_helper.rb |