Difference between built-in rails testing framework and minitest-rails

168 views
Skip to first unread message

siva subrahmanyam

unread,
Feb 26, 2014, 12:32:36 PM2/26/14
to minites...@googlegroups.com


  Hi Guys

    I am new to minitest. This question may be basic question. Every one knows rails ships by default testing framework called Test::Unit::TestCase. How far this minitest-rails is different from Test::Unit? Could you clarify?

Mike Moore

unread,
Feb 28, 2014, 11:42:36 AM2/28/14
to minites...@googlegroups.com
Rails has a handful of test classes. ActiveSupport::TestCase, ActionController::TestCase, ActionView::TestCase, and ActiveDispatch::IntegrationTest. The latter three inherit from ActiveSupport::TestCase.

In Rails 3.x, ActiveSupport::TestCase inherits from Test::Unit::TestCase
In Rails 4.0, ActiveSupport::TestCase inherits from MiniTest::Unit::TestCase
In Rails 4.1, ActiveSupport::TestCase inherits from Minitest::Test

On Ruby 1.9 and 2.x, Test::Unit::TestCase inherits from MiniTest::Unit::TestCase.

So, if you are on a modern Ruby and a somewhat modern Rails you are already using Minitest.

minitest-rails is a replacement for the default Rails testing engine that enables Minitest features like the Spec DSL that Rails disables by default. That's it. You get some new options in the generators to support the Spec DSL. And you some new rake tasks.


On Wed, Feb 26, 2014 at 10:32 AM, siva subrahmanyam <subbu98...@gmail.com> wrote:


  Hi Guys

    I am new to minitest. This question may be basic question. Every one knows rails ships by default testing framework called Test::Unit::TestCase. How far this minitest-rails is different from Test::Unit? Could you clarify?

--
-- You received this message because you are subscribed to the Google Groups minitest-rails group. To post to this group, send email to minites...@googlegroups.com. To unsubscribe from this group, send email to minitest-rail...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/minitest-rails?hl=en
---
You received this message because you are subscribed to the Google Groups "minitest-rails" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minitest-rail...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages