Class: Cucumber::Formatter::URLReporter

Inherits:
Object
  • Object
show all
Includes:
Term::Banner
Defined in:
lib/cucumber/formatter/url_reporter.rb

Instance Method Summary collapse

Methods included from Term::Banner

#display_banner

Constructor Details

#initialize(io) ⇒ URLReporter

Returns a new instance of URLReporter.



8
9
10
# File 'lib/cucumber/formatter/url_reporter.rb', line 8

def initialize(io)
  @io = io
end

Instance Method Details

#report(url) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/cucumber/formatter/url_reporter.rb', line 12

def report(url)
  uri = URI(url)
  display_banner(
    [
      'View your Cucumber Report at:',
      [["https://reports.cucumber.io#{uri.path}", :cyan, :bold, :underline]],
      '',
      [['This report will self-destruct in 24h unless it is claimed or deleted.', :green, :bold]]
    ],
    @io
  )
end