I have a MiniTest package. I use the basic Minitest::Unit::TestCase , not the specs. I have setup and teardown methods defined in my TestCase subclass. They work fine when I run the test file as follows: ruby test/whatever_test.rb . But when I run rake test , setup and teardown not called. Relevant part of my rakefile:
require 'rake/testtask' Rake::TestTask.new do |t| t.test_files = FileList['test/*_test.rb'] t.verbose = true end
Why not run setup and teardown when using Rake::TestTask ?
I would enter the code for the test code here, but there are quite a lot of it. I will definitely enclose a few subsets if there is any section that you would like to see.
I am running Minitest 4.3.2 on Ruby 1.9.3-p194.
rlkw1024
source share