Guest User

Untitled

a guest
Jul 18th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. Around('@stub_facebook') do |scenario, block|
  2. class OmniAuth::Builder
  3. alias_method :orig_call, :call
  4. def call(env)
  5. TestOmniAuth.new(@app).call(env)
  6. end
  7. end
  8.  
  9. #for some reason this doesn't work
  10. Rails.application.config.middleware.swap OmniAuth::Builder, TestOmniAuth
  11. block.call
  12.  
  13. class OmniAuth::Builder
  14. alias_method :call, :orig_call
  15. end
  16. end
Add Comment
Please, Sign In to add comment