Sha256: 62c8bcf99db7762d542bf7d4d0f5873390e74ef0e6508393ddd9deda3d7833ee

Contents?: true

Size: 1.2 KB

Versions: 52

Compression:

Stored size: 1.2 KB

Contents

# frozen_string_literal: true

require 'pathname'

ROOT = Pathname.new(File.expand_path('../../', __FILE__))
$LOAD_PATH.unshift((ROOT + 'lib').to_s)
$LOAD_PATH.unshift((ROOT + 'spec').to_s)

RSpec.configure do |config|
  # Use color in STDOUT
  config.color = true
end

RSpec::Matchers.define :including do |x|
  match { |actual| actual.include? x }
end

require 'bundler/setup'
require 'pry'

require 'danger'
require 'cork'
require 'danger_plugin'

# These functions are a subset of https://github.com/danger/danger/blob/master/spec/spec_helper.rb
# If you are expanding these files, see if it's already been done ^.

# A silent version of the user interface
def testing_ui
  Cork::Board.new(silent: true)
end

# Example environment (ENV) that would come from
# running a PR on TravisCI
def testing_env
  {
    'HAS_JOSH_K_SEAL_OF_APPROVAL' => 'true',
    'TRAVIS_PULL_REQUEST' => '800',
    'TRAVIS_REPO_SLUG' => 'artsy/eigen',
    'TRAVIS_COMMIT_RANGE' => '759adcbd0d8f...13c4dc8bb61d',
    'DANGER_GITHUB_API_TOKEN' => '123sbdq54erfsd3422gdfio'
  }
end

# A stubbed out Dangerfile for use in tests
def testing_dangerfile
  env = Danger::EnvironmentManager.new(testing_env)
  Danger::Dangerfile.new(env, testing_ui)
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
danger-swiftlint-0.37.0 spec/spec_helper.rb
danger-swiftlint-0.36.1 spec/spec_helper.rb
danger-swiftlint-0.35.0 spec/spec_helper.rb
danger-swiftlint-0.34.0 spec/spec_helper.rb
danger-swiftlint-0.33.0 spec/spec_helper.rb
danger-swiftlint-0.32.0 spec/spec_helper.rb
danger-swiftlint-0.31.0 spec/spec_helper.rb
danger-swiftlint-0.30.2 spec/spec_helper.rb
danger-swiftlint-0.30.1 spec/spec_helper.rb
danger-swiftlint-0.30.0 spec/spec_helper.rb
danger-swiftlint-0.29.4 spec/spec_helper.rb
danger-swiftlint-0.29.3 spec/spec_helper.rb
danger-swiftlint-0.29.2 spec/spec_helper.rb
danger-swiftlint-0.29.1 spec/spec_helper.rb
danger-swiftlint-0.29.0 spec/spec_helper.rb
danger-swiftlint-0.28.0 spec/spec_helper.rb
danger-swiftlint-0.27.0 spec/spec_helper.rb
danger-swiftlint-0.26.0 spec/spec_helper.rb
danger-swiftlint-0.25.0 spec/spec_helper.rb
danger-swiftlint-0.24.5 spec/spec_helper.rb