Class: CapturefulFormatter::Structures::Scenario

Inherits:
Object
  • Object
show all
Defined in:
lib/captureful_formatter/structures.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(notification) ⇒ Scenario

notification

ExampleNotification



43
44
45
46
47
48
49
50
# File 'lib/captureful_formatter/structures.rb', line 43

def initialize(notification)
  @steps = []
  @status = nil
  @description = notification.group.description
  @exception = nil
  feature_description = notification.group.[:parent_example_group][:description]
  @hash = Digest::MD5.hexdigest("#{feature_description}#{notification.group.description}")
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



37
38
39
# File 'lib/captureful_formatter/structures.rb', line 37

def description
  @description
end

#exceptionObject

Returns the value of attribute exception.



39
40
41
# File 'lib/captureful_formatter/structures.rb', line 39

def exception
  @exception
end

#statusObject

Returns the value of attribute status.



38
39
40
# File 'lib/captureful_formatter/structures.rb', line 38

def status
  @status
end

#stepsObject

Returns the value of attribute steps.



36
37
38
# File 'lib/captureful_formatter/structures.rb', line 36

def steps
  @steps
end

Instance Method Details

#hashObject



52
53
54
# File 'lib/captureful_formatter/structures.rb', line 52

def hash
  @hash
end

#step_countObject



56
57
58
# File 'lib/captureful_formatter/structures.rb', line 56

def step_count
  @steps.size
end