Why does my minitest.rake work twice when I enter rake in the terminal?

I created minitest.rake, according to rayan raatescast ( http://railscasts.com/episodes/327-minitest-with-rails ).

When I run rake in the terminal, the test starts and then starts again before resetting the command line.

require "rake/testtask"

Rake::TestTask.new(:test => "db:test:prepare") do |t|
  t.libs << "test"
  t.pattern = "test/**/*_test.rb"
end

task default: :test
+5
source share
3 answers

I would suggest that you already have a task with that name. If you define a new task with the same name, it is added to the existing one.

What if you delete or comment out this code and execute rake -T, will there be a testtask?

+3
source

; . mintest1.rake.

, rake paperclip.rake. - , . , , Paperclip paperclip.rake. paperclip.rake pc.rake, .

+3

Have you tried rake test:single TEST=path/to/test.rb?

If I were to drop: one, then it would work twice.

0
source

All Articles