15

While trying to migrate, I keep getting this error:

rake aborted!
test-unit is not part of the bundle. Add it to Gemfile.

If I'm using RSpec, can I just delete the test folder altogether?

teecraft
  • 927
  • 2
  • 9
  • 10
  • See also: http://stackoverflow.com/questions/5072662/how-to-remove-unit-test-and-replace-it-with-rspec – David J. Jun 23 '12 at 20:17

3 Answers3

23

This error means that somewhere inside your project there is a require test-unit without it being specified in the Gemfile.

So you should actually try to find that statement and remove it to fix this error (or add the dependency to the gemfile --but that sounds a bit backwards if you are not using it).

Anyway: you can definitely remove the test folder if you are using rspec.

nathanvda
  • 49,707
  • 13
  • 117
  • 139
  • 1
    Usually, if you're using test unit, in your `/config/application.rb` there should be a `require 'rails/test_unit/railtie'` - which might be what's tripping you up. – theTRON Jun 05 '11 at 12:02
1

I believe so. Rspec should only be looking for tests in ../spec/*

chuck son
  • 194
  • 2
  • 8
0

Yes you can delete the test folder.

If you want test-unit though (due to other gem dependencies) here's how to install test-unit as a gem:

  1. Add gem to Gemfile

    gem 'test-unit'

  2. Check gems

    bundle check

    Your Gemfile's dependencies could not be satisfied Install missing gems with bundle install

  3. Install

    bundle install

Should be good to go.

jrasmusson
  • 276
  • 2
  • 3