Sha256: 2b7dab76037ac218b8e556fd6b670e8702be795d09669af72537621949ba35d9
Contents?: true
Size: 1000 Bytes
Versions: 3
Compression:
Stored size: 1000 Bytes
Contents
# frozen_string_literal: true ENV['RACK_ENV'] = "test" require 'rubygems' require 'bundler/setup' require 'simplecov' SimpleCov.start require 'split' require 'ostruct' require 'yaml' Dir['./spec/support/*.rb'].each { |f| require f } module GlobalSharedContext extend RSpec::SharedContext let(:mock_user){ Split::User.new(double(session: {})) } before(:each) do Split.configuration = Split::Configuration.new Split.redis = Redis.new Split.redis.select(10) Split.redis.flushdb Split::Cache.clear @ab_user = mock_user params = nil end end RSpec.configure do |config| config.order = 'random' config.include GlobalSharedContext 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
split-4.0.1 | spec/spec_helper.rb |
split-4.0.0.pre2 | spec/spec_helper.rb |
split-4.0.0.pre | spec/spec_helper.rb |