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

#command_stringObject

Returns the value of attribute command_string

Returns:

  • (Object)

    the current value of command_string



69
70
71
# File 'lib/turbo_tests.rb', line 69

def command_string
  @command_string
end

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



69
70
71
# File 'lib/turbo_tests.rb', line 69

def description
  @description
end

#execution_resultObject

Returns the value of attribute execution_result

Returns:

  • (Object)

    the current value of execution_result



69
70
71
# File 'lib/turbo_tests.rb', line 69

def execution_result
  @execution_result
end

#full_descriptionObject

Returns the value of attribute full_description

Returns:

  • (Object)

    the current value of full_description



69
70
71
# File 'lib/turbo_tests.rb', line 69

def full_description
  @full_description
end

#locationObject

Returns the value of attribute location

Returns:

  • (Object)

    the current value of location



69
70
71
# File 'lib/turbo_tests.rb', line 69

def location
  @location
end

#location_rerun_argumentObject

Returns the value of attribute location_rerun_argument

Returns:

  • (Object)

    the current value of location_rerun_argument



69
70
71
# File 'lib/turbo_tests.rb', line 69

def location_rerun_argument
  @location_rerun_argument
end

#metadataObject

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



69
70
71
# File 'lib/turbo_tests.rb', line 69

def 
  @metadata
end

#process_idObject

Returns the value of attribute process_id

Returns:

  • (Object)

    the current value of process_id



69
70
71
# File 'lib/turbo_tests.rb', line 69

def process_id
  @process_id
end

Class Method Details

.from_obj(obj, process_id:, command_string:) ⇒ Object



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

def self.from_obj(obj, process_id:, command_string:)
  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,
    command_string,
  )
end

Instance Method Details

#notificationObject



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

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