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



57
58
59
# File 'lib/turbo_tests.rb', line 57

def description
  @description
end

#execution_resultObject

Returns the value of attribute execution_result

Returns:

  • (Object)

    the current value of execution_result



57
58
59
# File 'lib/turbo_tests.rb', line 57

def execution_result
  @execution_result
end

#full_descriptionObject

Returns the value of attribute full_description

Returns:

  • (Object)

    the current value of full_description



57
58
59
# File 'lib/turbo_tests.rb', line 57

def full_description
  @full_description
end

#locationObject

Returns the value of attribute location

Returns:

  • (Object)

    the current value of location



57
58
59
# File 'lib/turbo_tests.rb', line 57

def location
  @location
end

#location_rerun_argumentObject

Returns the value of attribute location_rerun_argument

Returns:

  • (Object)

    the current value of location_rerun_argument



57
58
59
# File 'lib/turbo_tests.rb', line 57

def location_rerun_argument
  @location_rerun_argument
end

#metadataObject

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



57
58
59
# File 'lib/turbo_tests.rb', line 57

def 
  @metadata
end

#process_idObject

Returns the value of attribute process_id

Returns:

  • (Object)

    the current value of process_id



57
58
59
# File 'lib/turbo_tests.rb', line 57

def process_id
  @process_id
end

Class Method Details

.from_obj(obj, process_id) ⇒ Object



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/turbo_tests.rb', line 69

def self.from_obj(obj, process_id)
  obj = obj.symbolize_keys
   = obj[:metadata].symbolize_keys

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

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

Instance Method Details

#notificationObject



92
93
94
# File 'lib/turbo_tests.rb', line 92

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