Sha256: 0fcac202b1b80f08e53621d83b962736f59ef13a0e7a946736869ff602219f56

Contents?: true

Size: 479 Bytes

Versions: 1

Compression:

Stored size: 479 Bytes

Contents

require 'rubygems'
require 'rack'
require 'rack/test'
require 'rack/response'

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]
  ses = @sessions.find_one( { :_id => session_id } )  
  ses.should_not be_nil
  ses['data'][key.to_s].should == val
end

def clear_sessions
  @sessions.remove()
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mongo_rack-0.0.2 spec/spec_helper.rb