Class: TurboTests::FakeExample

Inherits:
Struct
  • Object
show all
Defined in:
lib/turbo_tests.rb,
lib/turbo_tests.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



71
72
73
# File 'lib/turbo_tests.rb', line 71

def description
  @description
end

#execution_resultObject

Returns the value of attribute execution_result

Returns:

  • (Object)

    the current value of execution_result



71
72
73
# File 'lib/turbo_tests.rb', line 71

def execution_result
  @execution_result
end

#full_descriptionObject

Returns the value of attribute full_description

Returns:

  • (Object)

    the current value of full_description



71
72
73
# File 'lib/turbo_tests.rb', line 71

def full_description
  @full_description
end

#locationObject

Returns the value of attribute location

Returns:

  • (Object)

    the current value of location



71
72
73
# File 'lib/turbo_tests.rb', line 71

def location
  @location
end

#location_rerun_argumentObject

Returns the value of attribute location_rerun_argument

Returns:

  • (Object)

    the current value of location_rerun_argument



71
72
73
# File 'lib/turbo_tests.rb', line 71

def location_rerun_argument
  @location_rerun_argument
end

#metadataObject

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



71
72
73
# File 'lib/turbo_tests.rb', line 71

def 
  @metadata
end

Class Method Details

.from_obj(obj) ⇒ Object



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/turbo_tests.rb', line 81

def from_obj(obj)
   = obj[:metadata]

  [:shared_group_inclusion_backtrace].map! do |frame|
    RSpec::Core::SharedExampleGroupInclusionStackFrame.new(
      frame[:shared_group_name],
      frame[:inclusion_location],
    )
  end

  [:shared_group_inclusion_backtrace] = .delete(:shared_group_inclusion_backtrace)

  new(
    FakeExecutionResult.from_obj(obj[:execution_result]),
    obj[:location],
    obj[:description],
    obj[:full_description],
    ,
    obj[:location_rerun_argument],
  )
end

Instance Method Details

#notificationObject



104
105
106
107
108
# File 'lib/turbo_tests.rb', line 104

def notification
  RSpec::Core::Notifications::ExampleNotification.for(
    self,
  )
end