Fixes issue with process method not visible in integration tests #14071

Open
wants to merge 1 commit into
from

Projects

None yet

5 participants

@mauricio
Contributor

Since process was private in ActionDispatch::Integration::RequestHelpers::Session, when you call process inside an integration test it would never call process at the current session as Ruby 2.0 and onwards only checks for public methods and process being private is always a false result when method_missing gets called inside ActionDispatch::Integration::RequestHelpers::Runner.

Making it public allows it to be called again inside integration tests and fixes rspec/rspec-rails#925.

@monfresh

Any updates on this PR? It would be great to have this fix so we can test the OPTIONS verb in RSpec tests. In the meantime, if anyone knows of a workaround, it would be greatly appreciated. Thanks!

@mauricio
Contributor

Still waiting for feedback so far, no one from the Rails team has looked at it, it seems.

@rafaelfranca
Member

Could you rebase it?

@mauricio mauricio Fixes issue with process method not visible in integration tests
Since process was private in ActionDispatch::Integration::RequestHelpers::Session,
when you call process inside an integration test it would never
call process on it as Ruby 2.0 and onwards only checks for public
methods. Making it public allows it to be called again inside
integration tests and fixes rspec/rspec-rails#925.
316db75
@mauricio
Contributor

@rafaelfranca rebased now.

@sgrif sgrif was assigned by rails-bot Oct 20, 2015
@jeremysears

I'm running into this too. I'd like to test OPTIONS HTTP Method for CORS preflight requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment