With minitest-spec-rails, we have a working solution, replacing MiniTest :: Spec as the superclass for ActiveSupport :: TestCase. This solution is simple and does not require you to re-create a new test case in your test_helper.rb or to use the generators supplied with gems such as minitest-rails.
Minimal changes for testing in Rails. Your test classes inherit from MiniTest :: Rails :: ActiveSupport :: TestCase, the opposite of ActiveSupport :: TestCase. You can use MiniTest :: Spec DSL. You can create test files with a standard model, controller, resource and other generators.
rails generate model User
or
And you can specify the creation of tests using DSL MiniTest :: Spec on any of the generators by providing the -spec option
rails generate model User --spec
vajapravin
source share