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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:50:23+00:00 2026-06-14T17:50:23+00:00

My rspec directory is beginning to get a little cluttered, so I moved all

  • 0

My rspec directory is beginning to get a little cluttered, so I moved all the specs to a cases directory. Upon doing so rspec stopped treating *_controller_spec.rb as :type => :controller. What is the magic way to get this behavior back?

  • 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-14T17:50:24+00:00Added an answer on June 14, 2026 at 5:50 pm

    Relevant comment form a discussion on the rspec-rails github page:

    The integration rspec-rails provides for the various spec types is based on modules that get included example groups based on the convention of which directory the spec files are in. Have a look at the example folder to see all the modules that get included each spec type. example.rb wires it all up based on the file_path.

    You’ll need to do this wiring yourself since you’re outside of the "normal" conventions for rspec-rails. You can either include the modules manually in each example group, use metadata to tag the example groups with their type, and include based on the type, or use a similar file_path convention approach as rspec-rails does.

    So basically, make a copy of this file and replace all the spec in calls to escaped_path by spec cases, then paste that into your RSpec::configure block. There might be an easier way to do it, this is just what I found after googling for a few seconds (never actually tried this myself).

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

Sidebar

Related Questions

I get this RSpec error when I try to embed one document in another.
In some Rspec model specs, we have several tests like this: it { should
I'm using Rails 3, machinist 2, cucumber and rspec all together and have two
rspec-rails (2.7.0) rails (3.0.10) post: Rails 3.1 Error Catching is irrelevant for me. Code:
The rspec test fails when trying to click_button Create my account saying The action
What does rspec gem do? It is named Behaviour driven development tool, but these
I recently started using rspec and factory_girl and I'm working on a basic control
I've been writing rspec + capybara tests for my application and came up with
I am using rspec and cucumber to run watir tests at sauce labs. I
I have the following rspec: require 'spec_helper' describe KnowledgesController do before (:each) do @knowledge

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.