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 8152393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:42:03+00:00 2026-06-06T15:42:03+00:00

I have recently started using RSpec for Integration testing in my Rails application, to

  • 0

I have recently started using RSpec for Integration testing in my Rails application, to avoid having to keep up to date with multiple testing frameworks, and am in the process of converting my Cucumber features to RSpec.

I have successfully got 1 integration test running, however, it appears to run through the example twice:

rspec spec/integration/create_article_spec.rb -f documentation

admin creates article
  successfully creates article

admin creates article
  successfully creates article

Finished in 0.51816 seconds
2 examples, 0 failures

Here is the contents of create_article_spec.rb:

require 'spec_helper'

feature "admin creates article" do
 scenario "successfully creates article" do
  visit admin_articles_url
  click_link "New Article"
  fill_in "Title", with: "Test 1"
  fill_in "Body", with: "Test Article"
  click_button "Save"
  page.should have_content "New Article Published"
 end
end

I can’t find any reason why this may be happening, and all the other situations where this has happened don’t apply in my case.

It only appears to happen with my Integration tests, all other tests do not appear to be affected.

I’m hoping someone with more RSpec knowledge than I can figure out where I may be missing something.

Versions

Rails (3.2.2)
RSpec (2.8.0)
RSpec-rails (2.8.1)

  • 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-06T15:42:05+00:00Added an answer on June 6, 2026 at 3:42 pm

    I realised that I had a line in my spec_helper.rb file including all the files in my integration tests folder, so they were in fact being loaded twice. I removed that line and it solved my issue.

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

Sidebar

Related Questions

I have recently started testing for my android application using Instrumentation framework. I have
I have recently started creating an iPhone application using Appcelerator's Titanium. Since the application
I have recently started using doc-view in Emacs, but I am having quite a
I have recently started using coffeescript with Rails and I am finding that sometimes
I have recently started looking into using Azure but I'm having some issues getting
Ive recently started using Ruby on Rails for a project of mine and have
We recently started using Eclipse to develop our java application and have been running
I recently started using Silex. I have been grouping certain functionality of my application
I have recently started using DocCheck for checking the validity of JavaDoc's in code
We have recently started using FxCop on our code base and I am in

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.