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



73
74
75
# File 'lib/turbo_tests.rb', line 73

def description
  @description
end

#execution_resultObject

Returns the value of attribute execution_result

Returns:

  • (Object)

    the current value of execution_result



73
74
75
# File 'lib/turbo_tests.rb', line 73

def execution_result
  @execution_result
end

#full_descriptionObject

Returns the value of attribute full_description

Returns:

  • (Object)

    the current value of full_description



73
74
75
# File 'lib/turbo_tests.rb', line 73

def full_description
  @full_description
end

#locationObject

Returns the value of attribute location

Returns:

  • (Object)

    the current value of location



73
74
75
# File 'lib/turbo_tests.rb', line 73

def location
  @location
end

#location_rerun_argumentObject

Returns the value of attribute location_rerun_argument

Returns:

  • (Object)

    the current value of location_rerun_argument



73
74
75
# File 'lib/turbo_tests.rb', line 73

def location_rerun_argument
  @location_rerun_argument
end

#metadataObject

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



73
74
75
# File 'lib/turbo_tests.rb', line 73

def 
  @metadata
end

Class Method Details

.from_obj(obj) ⇒ Object



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

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



106
107
108
109
110
# File 'lib/turbo_tests.rb', line 106

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