Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.78 KB | None | 0 0
  1. gems:
  2. gem 'simplecov', '~> 0.16'
  3. gem 'simplecov-console'
  4. gem 'minitest-reporters'
  5.  
  6. test_helper.rb
  7.  
  8. require 'simplecov'
  9. require 'simplecov-console'
  10. require "minitest/reporters"
  11. require 'webmock/minitest'
  12.  
  13. class Minitest::Reporters::SpecReporter
  14.   def record_print_status(test)
  15.     print_colored_status(test)
  16.     print(" (%.2fs)" % test.time) unless test.time.nil?
  17.  
  18.     test_name = test.name.gsub(/^test_: /, 'test:')
  19.     print pad_test(test_name)
  20.     puts
  21.   end
  22. end
  23.  
  24. # For tests performance tuning:
  25. #Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
  26. Minitest::Reporters.use! Minitest::Reporters::ProgressReporter.new
  27.  
  28. SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
  29.   SimpleCov::Formatter::HTMLFormatter,
  30.   SimpleCov::Formatter::Console,
  31. ])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement