1

I am starting out with Rails 3.2 and I have some questions regarding unit testing. I don't understand the minitest framework and test unit framework. Are they two separate things or is minitest an extension of test unit? Which should I use? I am using Rubymine and I got some strange errors while I tried to run the unit tests. Finally I added gem 'test-unit' and then it suddenly worked, but I don't understand why.

This is some of my gem file:

gem 'test-unit'

group :test do
  if RUBY_PLATFORM =~ /(win32|w32)/
    gem "win32console", '1.3.0'
  end
  gem "minitest"
  gem "minitest-reporters", '>= 0.5.0'
end

and this is the test_helper

ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'minitest/reporters'
MiniTest::Reporters.use!

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

Could someone explain what all of this is?

LuckyLuke
  • 47,771
  • 85
  • 270
  • 434

0 Answers0