Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7975727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:43:23+00:00 2026-06-04T08:43:23+00:00

My Cucumber scenario is used to test authentication from a third party provider. What

  • 0

My Cucumber scenario is used to test authentication from a third party provider. What happens is when the facebook connect button is clicked on my registration page a redirect goes to Facebook, and when the credentials are authorized by Facebook, then a redirect happens back to my website.

In my selenium test, it is using the development database on redirect. I know this because its ending up on a page where there is data which shouldn’t be the case because the test database is empty.

features/authentication.feature:

  @javascript
  Scenario: Signup through Facebook
    When I am on the signup page
    And I click the Facebook authentication link
    And I fill and submit the Facebook form
    Then I should be on the Add additional information page

This fails on the I should be on the Add additional information page step because I never get there. This means a data row exists for the facebook user which means its using the development database. Is there a setting I’m missing?

features/support/env.rb

require 'cucumber/rails'

ENV["RAILS_ENV"] ||= 'test'
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
Capybara.default_selector = :css
Capybara.javascript_driver = :webkit
Capybara.app_host = "http://localhost:3000"

# factory_girl Factory definitions
Dir[(Rails.root + "spec/factories/**/*.rb").to_s].each {|factory| require factory}

ActionController::Base.allow_rescue = false

Cucumber::Rails::Database.javascript_strategy = :truncation
Cucumber::Rails::World.use_transactional_fixtures = true
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T08:43:24+00:00Added an answer on June 4, 2026 at 8:43 am

    Remove Capybara.app_host = "http://localhost:3000"
    You’re running the server in development environment and making Capybara use it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to rails and cucumber and I'm trying to test the following scenario
I've been having trouble using cucumber and webrat to test authlogic-openid authentication in a
I used cucumber for the first time with rails 3. Gemfile group :test do
I'm using cucumber for BDD and I used @wip tag for a certain scenario
I'm using Devise for user Authentication and have the following failing Cucumber scenario: Scenario:
For a Cucumber scenario on my Rails 3.1 app, I used the @javascript tag,
My cucumber scenario is as follows: Scenario: test add user Given I logged in
I started migrating from cucumber + webrat to cucumber + capybara. Now the behavior
I'm looking at a cucumber test suite that is somewhat brittle right now; many
How do I mark a cucumber scenario as pending so it doesn't get counted

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.