Class: RSpec::Support::RackApp
- Inherits:
-
Object
- Object
- RSpec::Support::RackApp
- Includes:
- Retry
- Defined in:
- lib/hanami/devtools/integration/rack_test.rb
Overview
Testing Rack application
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize ⇒ RackApp
constructor
A new instance of RackApp.
Constructor Details
#initialize ⇒ RackApp
Returns a new instance of RackApp.
30 31 32 |
# File 'lib/hanami/devtools/integration/rack_test.rb', line 30 def initialize @connection = Excon.new(Capybara.app_host, persistent: true, read_timeout: 5) end |
Instance Method Details
#call(env) ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/hanami/devtools/integration/rack_test.rb', line 34 def call(env) retry_exec(Excon::Errors::SocketError) do response( request(env) ) end end |