sorcery
sorcery copied to clipboard
Testing external module with acceptance test
Is it possible to test external module like Facebook using acceptance test with sorcery without touching Facebook? (in isolation)
I assume you're asking about test helpers to mock hitting an OAuth provider (e.g. Facebook) without actually hitting the provider?
Unfortunately, no, I don't believe Sorcery provides built-in support for that. You can however use other gems to mock API calls/responses, which should work.
For Sorcery v1, I plan on migrating Sorcery to using OmniAuth for OAuth integration, which does have built-in mocking: https://github.com/omniauth/omniauth/wiki/Integration-Testing
Having omniauth-like testing funcationality built-in would be great.