class TestBoosters::Boosters::Minitest

Constants

FILE_PATTERN

Public Class Methods

new() click to toggle source
Calls superclass method TestBoosters::Boosters::Base::new
# File lib/test_boosters/boosters/minitest.rb, line 7
def initialize
  super(FILE_PATTERN, nil, split_configuration_path, command)
end

Public Instance Methods

command() click to toggle source
# File lib/test_boosters/boosters/minitest.rb, line 11
def command
  if command_set_with_env_var?
    command_from_env_var
  elsif rails_app?
    "bundle exec rails test"
  else
    "ruby -e 'ARGV.each { |f| require \"./\#{f}\" }'"
  end
end
command_from_env_var() click to toggle source
# File lib/test_boosters/boosters/minitest.rb, line 29
def command_from_env_var
  ENV["MINITEST_BOOSTER_COMMAND"].to_s
end
command_set_with_env_var?() click to toggle source
# File lib/test_boosters/boosters/minitest.rb, line 25
def command_set_with_env_var?
  !command_from_env_var.empty?
end
split_configuration_path() click to toggle source
# File lib/test_boosters/boosters/minitest.rb, line 21
def split_configuration_path
  ENV["MINITEST_SPLIT_CONFIGURATION_PATH"] || "#{ENV["HOME"]}/minitest_split_configuration.json"
end

Private Instance Methods

rails_app?() click to toggle source
# File lib/test_boosters/boosters/minitest.rb, line 35
def rails_app?
  File.exist?("app") && File.exist?("config") && File.exist?("config/application.rb")
end