class Fitting::Records::Tested::Request
Public Class Methods
new(env_response, test_title)
click to toggle source
# File lib/fitting/records/tested/request.rb, line 9 def initialize(env_response, test_title) @env_response = env_response @test_title = test_title end
Public Instance Methods
body()
click to toggle source
# File lib/fitting/records/tested/request.rb, line 22 def body @body ||= @env_response.request.env['action_dispatch.request.request_parameters'] end
method()
click to toggle source
# File lib/fitting/records/tested/request.rb, line 14 def method @method ||= @env_response.request.request_method end
path()
click to toggle source
# File lib/fitting/records/tested/request.rb, line 18 def path @path ||= Tomograph::Path.new(@env_response.request.env['PATH_INFO'] || @env_response.request.fullpath) end
response()
click to toggle source
# File lib/fitting/records/tested/request.rb, line 26 def response @response ||= Fitting::Records::Tested::Response.new(@env_response) end
test_file_path()
click to toggle source
# File lib/fitting/records/tested/request.rb, line 34 def test_file_path @test_file_path ||= test_path.split(':').first end
test_path()
click to toggle source
# File lib/fitting/records/tested/request.rb, line 30 def test_path @test_path ||= @test_title[/#{'\(\.'}(.*?)#{'\)'}/m, 1] || @test_title[/#{'\.'}(.*?)#{'\"'}/m, 1] end
to_spherical()
click to toggle source
# File lib/fitting/records/tested/request.rb, line 38 def to_spherical Fitting::Records::Spherical::Request.new( method: method, path: path, body: body, response: response.to_spherical, title: test_path, group: test_file_path ) end