Remove test_unit

30 views
Skip to first unread message

Linus Pettersson

unread,
Aug 28, 2012, 7:55:33 AM8/28/12
to rubyonra...@googlegroups.com
Hi!

I have an app that uses Rails 3.2.7. I want to use minitest-rails (https://github.com/blowmage/minitest-rails) instead of test_unit. I have installed it and it works fine. The problem is when I generate something, say a model, it still uses the test_unit generators and NOT minitest.

So, I need to remove this somehow. I created a new app from scratch and used minitest-rails and it works, so there is something weird going on in my app.

I have this in in "application.rb"
# Pick the frameworks you want:
require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
require "sprockets/railtie"
# require "rails/test_unit/railtie"  ## No test_unit!!

Still in "application.rb", I have this:
module MyApp
  class Application < Rails::Application

    config.generators do |g|
      g.test_framework :mini_test, :spec => true, :fixture => false
    end

  end
end

Is there anything else I need to do? What could be loading test_unit??

Benjamin Iandavid Rodriguez

unread,
Aug 28, 2012, 9:33:55 AM8/28/12
to rubyonra...@googlegroups.com
Under your application.rb file remove the line:

require 'rails/all'

and include only the railties you need excluding test unit

Regards.

2012/8/28 Linus Pettersson <linus.pe...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/V4aaGxhXya4J.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Linus Pettersson

unread,
Aug 28, 2012, 10:08:16 AM8/28/12
to rubyonra...@googlegroups.com
As you can see in my first post I have that already :)

I found the answer though. Another gem, "factory_girl_rails" requires test_unit. So I'll just remove that :)
Reply all
Reply to author
Forward
0 new messages