lib/pry-test/test_wrapper.rb
# Builds a Hash of assert information for the given assert value & call stack location.
#
# @params [Boolean] value The value of assert.
# @param [Thread::Backtrace::Location] location The call stack location to extract info from.
#
# @example
#   {
#     :file_path => "/path/to/test_file.rb",
#     :line_num => 100,
#     :line => "  assert 'something' do"
#   }
#
# @return [Hash]
Builds a Hash of assert information for the given assert value & call stack location.
Builds a Hash of assert information for the given assert value & call stack location .
def assert_info(value, location)
      info = {
        file_path: location.absolute_path,
        line_num: location.lineno
      }
      info.merge! line_info(location) unless value
      info
    end
def assert_info ( value , location ) info = { file_path : location . absolute_path , line_num : location . lineno } info . merge! line_info ( location ) unless value info end
Builds a Hash of assert information for the given assert value & call stack location.
Builds a Hash of assert information for the given assert value & call stack location .
None
Hash
value
location
location The call stack location to extract info from.
location The call stack location to extract info from .
params
[Boolean] value The value of assert.
[ Boolean ] value The value of assert .
example
None