Class: TestLauncher::Frameworks::Minitest::TestCase

Inherits:
Base::TestCase show all
Defined in:
lib/test_launcher/frameworks/minitest.rb

Instance Attribute Summary

Attributes inherited from Implementation::TestCase

#example, #file, #line_number, #request

Instance Method Summary collapse

Methods inherited from Implementation::TestCase

#app_root, #exploded_path, from_search, #initialize, #is_example?, #mtime, #test_root

Constructor Details

This class inherits a constructor from TestLauncher::Frameworks::Implementation::TestCase

Instance Method Details

#example_runnerObject



122
123
124
125
126
127
128
# File 'lib/test_launcher/frameworks/minitest.rb', line 122

def example_runner
  if spring_enabled?
    "bundle exec spring testunit"
  else
    "bundle exec ruby -I test"
  end
end

#file_runnerObject



130
131
132
133
134
135
136
# File 'lib/test_launcher/frameworks/minitest.rb', line 130

def file_runner
  if spring_enabled?
    "bundle exec spring testunit"
  else
    "bundle exec ruby -I test -e 'ARGV.each {|f| require(f)}'"
  end
end

#spring_enabled?Boolean

Returns:

  • (Boolean)


142
143
144
145
146
147
148
149
150
151
# File 'lib/test_launcher/frameworks/minitest.rb', line 142

def spring_enabled?
  return false if request.disable_spring?

  [
    "bin/spring",
    "bin/testunit"
  ].any? {|f|
    File.exist?(File.join(app_root, f))
  }
end

#test_root_dir_nameObject



138
139
140
# File 'lib/test_launcher/frameworks/minitest.rb', line 138

def test_root_dir_name
  "test"
end