You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

publish_banner_printer_spec.rb 2.3 kB

2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # frozen_string_literal: true
  2. require 'spec_helper'
  3. require 'cucumber/formatter/spec_helper'
  4. require 'cucumber/formatter/publish_banner_printer'
  5. module Cucumber
  6. module Formatter
  7. describe PublishBannerPrinter do
  8. extend SpecHelperDsl
  9. include SpecHelper
  10. before do
  11. Cucumber::Term::ANSIColor.coloring = false
  12. @err = StringIO.new
  13. @formatter = PublishBannerPrinter.new(actual_runtime.configuration.with_options(error_stream: @err))
  14. end
  15. context 'passing scenario' do
  16. define_feature <<-FEATURE
  17. Feature: Banana party
  18. FEATURE
  19. it 'prints banner' do
  20. run_defined_feature
  21. expect(@err.string).to include(<<~BANNER)
  22. ┌──────────────────────────────────────────────────────────────────────────────┐
  23. │ Share your Cucumber Report with your team at https://reports.cucumber.io │
  24. │ │
  25. │ Command line option: --publish │
  26. │ Environment variable: CUCUMBER_PUBLISH_ENABLED=true │
  27. │ cucumber.yml: default: --publish │
  28. │ │
  29. │ More information at https://cucumber.io/docs/cucumber/environment-variables/ │
  30. │ │
  31. │ To disable this message, specify CUCUMBER_PUBLISH_QUIET=true or use the │
  32. │ --publish-quiet option. You can also add this to your cucumber.yml: │
  33. │ default: --publish-quiet │
  34. └──────────────────────────────────────────────────────────────────────────────┘
  35. BANNER
  36. end
  37. end
  38. end
  39. end
  40. end

No Description

Contributors (1)