From 7fc104a019d6687e76f635e755c398a5aa32f988 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Sun, 2 Sep 2018 13:58:42 +0300 Subject: [PATCH] Use minitest-profile to find long tests Only found one big fibo All else due to large amount of objects (now with factories it jumped from hundreds to thousands) --- Gemfile | 1 + Gemfile.lock | 2 ++ test/elf/test_something.rb | 2 +- test/helper.rb | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 79d3889b..34e51d1c 100644 --- a/Gemfile +++ b/Gemfile @@ -13,6 +13,7 @@ group :test do gem "simplecov" gem "minitest-color" gem 'minitest-fail-fast' + gem 'minitest-profile' #gem "minitest-reporters" gem "net-ssh" end diff --git a/Gemfile.lock b/Gemfile.lock index b97e088a..c3e1903c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -51,6 +51,7 @@ GEM minitest (~> 5) minitest-fail-fast (0.1.0) minitest (~> 5) + minitest-profile (0.0.2) nenv (0.3.0) net-scp (1.2.1) net-ssh (>= 2.6.5) @@ -98,6 +99,7 @@ DEPENDENCIES guard-minitest minitest-color minitest-fail-fast + minitest-profile net-ssh rake rb-readline diff --git a/test/elf/test_something.rb b/test/elf/test_something.rb index d2e8caed..4985451e 100644 --- a/test/elf/test_something.rb +++ b/test/elf/test_something.rb @@ -18,7 +18,7 @@ module Elf return result end def main(arg) - return fibo(20) + return fibo(8) end HERE @exit_code = 4 diff --git a/test/helper.rb b/test/helper.rb index b3abd621..86116324 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -15,6 +15,7 @@ end require "minitest/color" require "minitest/autorun" require "minitest/fail_fast" unless ENV["TEST_ALL"] +require 'minitest/profile' #require "minitest/reporters" #Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new