Skip to content

Instantly share code, notes, and snippets.

@dpickett
Created December 30, 2010 15:00
Show Gist options
  • Select an option

  • Save dpickett/759871 to your computer and use it in GitHub Desktop.

Select an option

Save dpickett/759871 to your computer and use it in GitHub Desktop.
Around('@stub_facebook') do |scenario, block|
class OmniAuth::Builder
alias_method :orig_call, :call
def call(env)
TestOmniAuth.new(@app).call(env)
end
end
#for some reason this doesn't work
Rails.application.config.middleware.swap OmniAuth::Builder, TestOmniAuth
block.call
class OmniAuth::Builder
alias_method :call, :orig_call
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment