airborne icon indicating copy to clipboard operation
airborne copied to clipboard

Include Rack::Response::Helpers in responses

Open scttnlsn opened this issue 8 years ago • 4 comments

This includes Rack::Response::Helpers methods in the Airborne responses. This enables the use of matchers like those commonly used with ActionDispatch::TestResponse.

i.e.


expect(response).to be_success
expect(response).to be_redirect
expect(response).to be_error
# etc.

A few other notes:

  • I added a rest_client_options setting (currently being used to set max_redirects)
  • I had to change the way that the requester module is accessed in base.rb. I was encountering an issue in the specs where once Airborne.configuration.rack_app was set it impacted other specs (that expected this value to be nil). I believe this issue is not showing itself on master since rack_sinatra_spec.rb is loaded last.

scttnlsn avatar May 02 '16 00:05 scttnlsn

Coverage Status

Coverage increased (+0.05%) to 99.019% when pulling 731802f553a5e83a012ecbbc6d80275f8948e28a on scttnlsn:rack-helpers into 3cc4112ae3f2f64aa35b3c365bc67ee7c8a7d5cf on brooklynDev:master.

coveralls avatar May 02 '16 00:05 coveralls

Coverage Status

Coverage increased (+0.05%) to 99.019% when pulling 1eb107dad6df1055c9df840f0b58c61050c2b36c on scttnlsn:rack-helpers into 3cc4112ae3f2f64aa35b3c365bc67ee7c8a7d5cf on brooklynDev:master.

coveralls avatar May 02 '16 00:05 coveralls

Fixed the merge conflicts here. Any interest in this PR?

scttnlsn avatar Aug 31 '16 12:08 scttnlsn

Coverage Status

Coverage increased (+0.05%) to 99.023% when pulling a55c7a259488c9f8727d3b14d77271f73ded0640 on scttnlsn:rack-helpers into 55311accd13abbe3a533429fdf80a66cb31dd84f on brooklynDev:master.

coveralls avatar Aug 31 '16 12:08 coveralls