Sha256: 1c34ed347493e366b5a6e79bebfdd0352a4d37d0d77f62de74857f9123b10331

Contents?: true

Size: 1003 Bytes

Versions: 5

Compression:

Stored size: 1003 Bytes

Contents

if RUBY_ENGINE == 'ruby'
  if ENV['CI']
    require 'coveralls'
    Coveralls::Output.silent = true
    Coveralls.wear! do
      add_filter 'spec/'
      add_filter 'example/'
    end
  else
    require 'simplecov'
    SimpleCov.start
  end
end

require 'rack/test'
require 'warden/github/rails/test_helpers'
require 'addressable/uri'

# Load the test rails app:
ENV['RAILS_ENV'] ||= 'test'
require 'rails_app/config/environment'

# Setup configs needed to run:
ENV['GITHUB_CLIENT_ID']     = 'test_client_id'
ENV['GITHUB_CLIENT_SECRET'] = 'test_client_secret'

RSpec.configure do |config|
  config.run_all_when_everything_filtered = true
  config.order = 'random'
  config.expect_with :rspec do |c|
    c.syntax = :expect
  end

  config.include Rack::Test::Methods
  config.include Warden::GitHub::Rails::TestHelpers

  # Reset warden's login states after each test.
  config.after { Warden.test_reset! }

  # This is how rack-test gets access to the app.
  def app
    RailsApp::Application
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
warden-github-rails-1.2.3 spec/spec_helper.rb
warden-github-rails-1.2.2 spec/spec_helper.rb
warden-github-rails-1.2.1 spec/spec_helper.rb
warden-github-rails-1.2.0 spec/spec_helper.rb
warden-github-rails-1.1.2 spec/spec_helper.rb