Sha256: fcfdae7c2f882701aeaafecb5c978e6fbe6fa330e45bcb2b869f25bd0c04065e

Contents?: true

Size: 888 Bytes

Versions: 3

Compression:

Stored size: 888 Bytes

Contents

ENV['RACK_ENV'] = 'test'
if ENV['COVERAGE']
  require 'simplecov'
  require 'simplecov-rcov'

  class SimpleCov::Formatter::MergedFormatter
    def format(result)
       SimpleCov::Formatter::HTMLFormatter.new.format(result)
       SimpleCov::Formatter::RcovFormatter.new.format(result)
    end
  end
  SimpleCov.formatter = SimpleCov::Formatter::MergedFormatter
  SimpleCov.start do
    add_filter '/test/'
    add_group 'helpers', 'lib/helpers'
  end
end
# Clear airbrake env if set
ENV['AIRBRAKE_API_KEY'] = nil
libpath = File.realpath(File.join(File.dirname(__FILE__), "..", "lib"))
require 'rspec'
require 'rack/test'
require 'fakeredis/rspec'
require 'redis-namespace'
require "#{libpath}/app.rb"

RSpec.configure do |conf|
  conf.include Rack::Test::Methods
  def app
    GaptoolServer
  end
end

DH = Gaptool::Data

conn = Redis.new
$redis = Redis::Namespace.new(:gt, redis:conn)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gaptool-server-0.7.4 test/test_helper.rb
gaptool-server-0.7.3 test/test_helper.rb
gaptool-server-0.7.1 test/test_helper.rb