Sha256: c761a8b3b3bc79a6b4a702d44596a807e3709b995af8068e6bb639c7f0aa6ae0
Contents?: true
Size: 950 Bytes
Versions: 5
Compression:
Stored size: 950 Bytes
Contents
# frozen_string_literal: true ENV['RACK_ENV'] = "test" require 'rubygems' require 'bundler/setup' require 'coveralls' Coveralls.wear! require 'split' require 'ostruct' require 'yaml' require 'complex' if RUBY_VERSION.match(/1\.8/) Dir['./spec/support/*.rb'].each { |f| require f } require "fakeredis" fakeredis = Redis.new RSpec.configure do |config| config.order = 'random' config.before(:each) do Split.configuration = Split::Configuration.new Split.redis = fakeredis Split.redis.flushall @ab_user = mock_user params = nil end end def mock_user Split::User.new(double(session: {})) 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') @request ||= begin r = OpenStruct.new r.user_agent = ua r.ip = '192.168.1.1' r end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
split-2.1.0 | spec/spec_helper.rb |
split-2.0.0 | spec/spec_helper.rb |
split-1.7.0 | spec/spec_helper.rb |
split-1.6.0 | spec/spec_helper.rb |
split-1.5.0 | spec/spec_helper.rb |