from Hacker News

Easy Rails OAuth integration testing with Omniauth and Capybara

by zapnap on 3/19/11, 11:52 PM with 10 comments

  • by idlewords on 3/20/11, 12:43 AM

    It's amusing that this post about some raft of dependencies that is supposed to make testing easy, painless and fun opens with a mini-rant about an earlier module that was supposed to make things super easy and fun, but ended up causing the author pain.

    This seems like a common Rails tradeoff (trading quick development time for dependency chasing and complexity), except it's rarely presented as a tradeoff.

  • by hopeless on 3/20/11, 7:47 AM

    I recently started using Omniauth & Capybara like this. It seems to work easily enough even for a relative testing novice like me.
  • by ryanfitz on 3/20/11, 2:02 AM

    I know this would slow down your integration tests and complicate them, but wouldn't you want to avoid mocking twitter this way to actually test that your site is integrating properly with the service? Mocking obviously has its place, but I'd avoid it if possible for end to end testing like this.