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

  • Home
  • SEARCH
  • 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 7747463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:32:09+00:00 2026-06-01T10:32:09+00:00

How to organize rspec 2 tests into ‘unit’ (fast) and ‘integration’ (slow) categories? I

  • 0

How to organize rspec 2 tests into ‘unit’ (fast) and ‘integration’ (slow) categories?

  • I want to be able to run all unit tests with just rspec command, but not the ‘integration’ tests.
  • I want to be able to run only ‘integration’ tests.
  • 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-01T10:32:11+00:00Added an answer on June 1, 2026 at 10:32 am

    We have groups of the same nature.
    We run then one by one both on the local dev boxes and on the CI.

    you can simply do

    bundle exec rake spec:unit
    bundle exec rake spec:integration
    bundle exec rake spec:api
    

    This is what our spec.rake looks like

      namespace :spec do
        RSpec::Core::RakeTask.new(:unit) do |t|
          t.pattern = Dir['spec/*/**/*_spec.rb'].reject{ |f| f['/api/v1'] || f['/integration'] }
        end
    
        RSpec::Core::RakeTask.new(:api) do |t|
          t.pattern = "spec/*/{api/v1}*/**/*_spec.rb"
        end
    
        RSpec::Core::RakeTask.new(:integration) do |t|
          t.pattern = "spec/integration/**/*_spec.rb"
        end
      end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to organize my solution by adding folders and organize classes into them
I like to organize my unit test classes into functional areas using folders, much
I am trying to organize a Zip Archive into an array so that I
Example: Contacts in iPhone does not organize contacts into groups (mailing lists). You could
I would like to organize my ****load of MySQL tables into smaller sections, or
I want to organize my c++ variables and functions in the following way: function
I'm trying to organize my workspace and want my intermediate objects to be put
I want to organize somehow my iPhone game's level-views, but I simply cannot (without
I am trying to organize my application into packages because it will have several
I am trying to organize my program into functions and have ran into this,

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.