Module: Adapters::Integration::Parallel
- Defined in:
- test/adapters/integration.rb
Instance Method Summary collapse
Instance Method Details
#test_in_parallel ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'test/adapters/integration.rb', line 26 def test_in_parallel resp1, resp2 = nil, nil connection = create_connection connection.in_parallel do resp1 = connection.get('echo?a=1') resp2 = connection.get('echo?b=2') assert connection.in_parallel? assert_nil resp1.body assert_nil resp2.body end assert !connection.in_parallel? assert_equal 'get ?{"a"=>"1"}', resp1.body assert_equal 'get ?{"b"=>"2"}', resp2.body end |