lib/fitting/records/tested/request.rb in fitting-2.18.0 vs lib/fitting/records/tested/request.rb in fitting-2.18.1
- old
+ new
@@ -4,13 +4,13 @@
module Fitting
class Records
class Tested
class Request
- def initialize(env_response, test_title)
+ def initialize(env_response, metadata)
@env_response = env_response
- @test_title = test_title
+ @metadata = metadata
end
def method
@method ||= @env_response.request.request_method
end
@@ -26,14 +26,14 @@
def response
@response ||= Fitting::Records::Tested::Response.new(@env_response)
end
def test_path
- @test_path ||= @test_title[/\\(\\.(.*?)\\)/m, 1] || @test_title[/\\.(.*?)\\"/m, 1]
+ @test_path ||= @metadata.fetch(:location)
end
def test_file_path
- @test_file_path ||= test_path.split(':').first
+ @test_file_path ||= @metadata.fetch(:file_path)
end
def to_spherical
Fitting::Records::Spherical::Request.new(
method: method,