Sha256: 926afc211c9c57f0da204fbb8694d9a254545fde215487fbb8ee30d8d84ffa7f

Contents?: true

Size: 722 Bytes

Versions: 3

Compression:

Stored size: 722 Bytes

Contents

ENV['RACK_ENV'] = "test"

require 'rubygems'
require 'bundler/setup'
require 'split'
require 'ostruct'
require 'yaml'
require 'complex' if RUBY_VERSION.match(/1\.8/)

Dir['./spec/support/*.rb'].each { |f| require f }

RSpec.configure do |config|
  config.order = 'random'
  config.before(:each) do
    Split.configuration = Split::Configuration.new
    Split.redis.flushall
    @ab_user = {}
    params = nil
  end
end

def session
  @session ||= {}
end

def params
  @params ||= {}
end

def request(ua = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; de-de) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27')
  r = OpenStruct.new
  r.user_agent = ua
  r.ip = '192.168.1.1'
  @request ||= r
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
split-0.6.2 spec/spec_helper.rb
split-0.6.1 spec/spec_helper.rb
split-0.6.0 spec/spec_helper.rb