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.

url_reporter_spec.rb 1.3 kB

2 years ago
123456789101112131415161718192021222324252627282930
  1. require 'stringio'
  2. require 'uri'
  3. require 'cucumber/formatter/url_reporter'
  4. module Cucumber
  5. module Formatter
  6. describe URLReporter do
  7. let(:io) { StringIO.new }
  8. subject { URLReporter.new(io) }
  9. context '#report' do
  10. it 'displays the provided string' do
  11. banner = [
  12. '┌──────────────────────────────────────────────────────────────────────────┐',
  13. '│ View your Cucumber Report at: │',
  14. '│ https://reports.cucumber.io/reports/<some-random-uid> │',
  15. '│ │',
  16. '│ This report will self-destruct in 24h unless it is claimed or deleted. │',
  17. '└──────────────────────────────────────────────────────────────────────────┘'
  18. ].join("\n")
  19. subject.report(banner)
  20. io.rewind
  21. expect(io.read).to eq("#{banner}\n")
  22. end
  23. end
  24. end
  25. end
  26. end

No Description

Contributors (1)