Method: RSpecSystem::Helper#result_data

Defined in:
lib/rspec-system/helper.rb

#result_dataRSpecSystem::Result

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Internal method to return any result data from resource execution time

If there are no previous results, it will execute the resource action and return those result. The action only runs once, so subsequent requests return the last result.

Returns:



115
116
117
118
119
120
121
122
123
124
125
# File 'lib/rspec-system/helper.rb', line 115

def result_data
  return rd unless rd.nil?

  begin
    Timeout::timeout(opts[:timeout]) do
      @rd = RSpecSystem::Result.new(execute)
    end
  rescue Timeout::Error => e
    raise RSpecSystem::Exception::TimeoutError, e.message
  end
end