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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:35:30+00:00 2026-05-30T08:35:30+00:00

I like to run my Rspec tests with Spork running in a separate tab.

  • 0

I like to run my Rspec tests with Spork running in a separate tab. I usually run my tests using rspec spec, by which I intend to say “search recursively and run everything in the spec folder.”

I’ve recently realized that this does not actually run all my tests. I now have a spec file in spec/requests which isn’t being run. I know this because I’ve edited one of the tests to raise an error, and run the following:

  • rspec spec – no error raised.
  • rspec spec/requests – still no error raised, and 0 examples, 0 failures!
  • rspec spec/requests/my_controller.rb – bingo. 17 examples, 1 failure and the failure has my error message.

Why isn’t Rspec finding all my test files? Is this a matter of configuration, or do I need to use a different command to run my tests?

I need to run all my tests at once to ensure that I’m not introducing regressions.

(Not using Spork makes no difference, by the way.)

  • 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-05-30T08:35:32+00:00Added an answer on May 30, 2026 at 8:35 am

    Rspec should already look recursively through the directory you named and find all tests. Note however, that it’s looking for files ending in _spec.rb. Maybe some of your files are not named correctly?

    If you need to be more specific about which files it should find, you can also use the --pattern option. For example: rspec --pattern spec/requests/*_spec.rb. (Option --pattern is equal to -P. Taken from rspec --help)

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

Sidebar

Related Questions

When running rspec tests on my rails app using rake or rake spec, it
I am trying to use https://github.com/rifraf/Vendorize which is run using a command like D:\projects\SomeLibrary\lib>ruby
I am using rspec and cucumber to run watir tests at sauce labs. I
when I run rspec spec/models result is OK. But when I use spork ,
I have a little script to run a search daemon, like: run.sh : cd
I would like to run a process from Python (2.4/2.5/2.6) using Popen , and
When I run rspec spec I get the following: /usr/local/lib/ruby/gems/1.9.1/gems/rspec-rails-2.7.0/lib/rspec/rails/extensions/active_record/base.rb:26:in `': uninitialized constant ActiveModel
We are using RSpec in a rails project for unit testing. I would like
I'd like to init the data base once everytime i run tests, rather than
Below are 3 random runs using time rspec spec vs time bundle exec spec

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.