Skip to content

Commit

Permalink
Ignore CUCUMBER_PUBLISH_TOKEN during cucumber tests
Browse files Browse the repository at this point in the history
Re-set it properly after each tests to be able to actually publish our
own reports.
  • Loading branch information
aurelien-reeves committed Jan 27, 2021
1 parent da38c03 commit 68dded4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions features/lib/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@
end

Around do |_, block|
original_publish_token = ENV['CUCUMBER_PUBLISH_TOKEN']
ENV.delete('CUCUMBER_PUBLISH_TOKEN')

original_coloring = Cucumber::Term::ANSIColor.coloring?

block.call

Cucumber::Term::ANSIColor.coloring = original_coloring

ENV['CUCUMBER_PUBLISH_TOKEN'] = original_publish_token
end

Around('@force_legacy_loader') do |_, block|
Expand Down

0 comments on commit 68dded4

Please sign in to comment.