Sha256: c79d503d733f80b6edbaa393473e4384ab1d6b9b487e870fbf495cc66182e984

Contents?: true

Size: 907 Bytes

Versions: 5

Compression:

Stored size: 907 Bytes

Contents

# encoding: utf-8

if RUBY_ENGINE == "rbx"
  require "codeclimate-test-reporter"
  CodeClimate::TestReporter.start
end

begin
  require 'byebug'
rescue LoadError; end

require 'pathname'
require 'rack/test'
require 'slim'

ENV['RACK_ENV'] = 'test'

SPEC_ROOT = Pathname(__FILE__).dirname

Dir[SPEC_ROOT.join('support/*.rb').to_s].each { |f| require f }
Dir[SPEC_ROOT.join('shared/*.rb').to_s].each { |f| require f }

require SPEC_ROOT.join('dummy/component/boot').to_s

module Test; end

RSpec.configure do |config|
  config.disable_monkey_patching!

  config.before(:suite) do
    Dummy::Application.freeze
  end

  config.include Rack::Test::Methods, type: :request
  config.include Helpers

  config.before do
    @test_constants = Test.constants
  end

  config.after do
    added_constants = Test.constants - @test_constants
    added_constants.each { |name| Test.send(:remove_const, name) }
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dry-web-roda-0.3.0 spec/spec_helper.rb
dry-web-roda-0.2.3 spec/spec_helper.rb
dry-web-roda-0.2.2 spec/spec_helper.rb
dry-web-roda-0.2.1 spec/spec_helper.rb
dry-web-roda-0.2.0 spec/spec_helper.rb