Class: CiSlack::Rspec::Notifier::Example

Inherits:
Object
  • Object
show all
Defined in:
lib/ci_slack/rspec/notifier.rb

Instance Method Summary collapse

Constructor Details

#initialize(example) ⇒ Example

Returns a new instance of Example.



18
19
20
# File 'lib/ci_slack/rspec/notifier.rb', line 18

def initialize(example)
  @example = example
end

Instance Method Details

#to_sObject



22
23
24
25
26
27
# File 'lib/ci_slack/rspec/notifier.rb', line 22

def to_s
  %(\n*Failed test:*
    > Scenario: _#{ description }_
    > File: #{ error_location }
    > Error: ```#{ error }```\n)
end