title: Testing omniauth with cucumber
body: <p>I am looking for help testing omniauth authentication with cucumber. I have tried following a tutorial (<a href="http://samuelmullen.com/2011/05/simple-integration-testing-with-cucumber-and-omniauth/" rel="nofollow">http://samuelmullen.com/2011/05/simple-integration-testing-with-cucumber-and-omniauth/</a>), but it doesn't seem to be calling the session controller at all.</p>
  
  <p>Here is what I have so far:</p>
  
  <p>features/support/env.rb:</p>
  
  <pre><code>Capybara.default_host = 'example.org'
  OmniAuth.config.test_mode = true
  OmniAuth.config.add_mock(:twitter, {
    :uid =&gt; '12345',
    :info =&gt; {
      :name =&gt; 'twitteruser',
    }
  })
  
  OmniAuth.config.add_mock(:facebook, {
    :uid =&gt; '12345',
    :info =&gt; {
      :name =&gt; 'facebookuser'
    }
  })
  </code></pre>
  
  <p>step definition:</p>
  
  <pre><code>Given /^I am signed in with provider "(.*)"$/ do |provider|
    visit "/auth/#{provider.downcase}"
  end
  </code></pre>
  
  <p>scenario:</p>
  
  <pre><code>Scenario: a user can log into facebook
    Given I am signed in with provider "facebook"
    And I am on the profile page for "facebookuser"
    Then I should see "facebookuser"
  </code></pre>
  
  <p>Any clue why this isn't working? :/. Thank you!</p>