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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:23:11+00:00 2026-06-17T07:23:11+00:00

I created a new Rails 3.2.x application with the -T option for no tests

  • 0

I created a new Rails 3.2.x application with the -T option for no tests because I wanted to use Rspec for testing.

Now I want to revert it back to Test::Unit. How can I do that such that all of the rake tasks work, and new scaffolds are generated with Test::Unit instead of RSpec test shells?

  • 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-17T07:23:12+00:00Added an answer on June 17, 2026 at 7:23 am

    After searching and hacking, here is what got it to work for me.

    1. Remove rspec and rspec-rails from the Gemfile
    2. Run “gem list rspec –local”, and do a “gem uninstall” for each of those rspec gems.
    3. Delete Gemfile.lock
    4. rm -r spec/
    5. bundle install
    6. mkdir test/
    7. Add “require ‘rails/all'” to config/application.rb
    8. Create a file test/test_helper.rb and put the following code in it:

      ENV["RAILS_ENV"] = "test"
      require File.expand_path('../../config/environment', __FILE__)
      require 'active_support'
      require 'rails/test_help'
      # require 'factory_girl_rails'  #use if you are using FactoryGirl for fixtures
      
      class ActiveSupport::TestCase
        # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
        #
        # Note: You'll currently still have to declare fixtures explicitly in integration tests
        # -- they do not yet inherit this setting 
        fixtures :all
      
        # Add more helper methods to be used by all tests here...
      end
      

    After that, you can generate tests using

    rails g integration_test SomeStories
    

    Or you can just add unit tests under test/unit and then run them with

    rake test
    rake test:recent
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just created a new rails application using command: rails blog Now I'm following
I just created a new rails app in Rails 3.1.1, and my application layout
I have created a Rails 3 project with mentioned option. Can I somehow revert
I'm using rvm 1.15.6 and ruby-1.9.3-p194. I've created a new Rails application with the
I am new in rails,and I create the first rails application (Blog) follow the
I just installed ruby on rails on windows. install mysql and created a new
I'm experiencing something that I can't explain with Rails 2.3.2. I've created a new
I created a new rails 3.2.0.rc1 app and generated a welcome controller with an
I am new to rails and am following the Depot application in the Pragmatic
I want to implement authorization in my Rails application on a model level (not

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.