spec/spec_helper.rb in danger-changelog-0.1.0 vs spec/spec_helper.rb in danger-changelog-0.2.0
- old
+ new
@@ -7,42 +7,21 @@
require 'pry'
require 'rspec'
require 'danger'
-# Use coloured output, it's the best.
RSpec.configure do |config|
config.filter_gems_from_backtrace 'bundler'
config.color = true
config.tty = true
end
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,
-# it comes with an extra function `.string` which will
-# strip all ANSI colours from the string.
-
-# rubocop:disable Lint/NestedMethodDefinition
def testing_ui
- @output = StringIO.new
- def @output.winsize
- [20, 9999]
- end
-
- cork = Cork::Board.new(out: @output)
- def cork.string
- out.string.gsub(/\e\[([;\d]+)?m/, '')
- end
- cork
+ Cork::Board.new(silent: true)
end
-# rubocop:enable Lint/NestedMethodDefinition
-# 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' => 'dblock/danger-changelog',