Class: TestLauncher::Frameworks::Minitest::TestCase
Instance Attribute Summary
#file, #line_number, #request
Instance Method Summary
collapse
#app_root, #exploded_path, from_search, #initialize, #is_example?, #mtime, #relative_file, #test_root
Instance Method Details
#example ⇒ Object
183
184
185
186
|
# File 'lib/test_launcher/frameworks/minitest.rb', line 183
def example
@memoized_example if defined?(@memoized_example)
@memoized_example = @example&.gsub(" ", "_")
end
|
#example_runner ⇒ Object
148
149
150
151
152
153
154
|
# File 'lib/test_launcher/frameworks/minitest.rb', line 148
def example_runner
if spring_enabled?
"#{spring_runner} rails test"
else
"bundle exec ruby -I test"
end
end
|
#file_runner ⇒ Object
156
157
158
159
160
161
162
|
# File 'lib/test_launcher/frameworks/minitest.rb', line 156
def file_runner
if spring_enabled?
"#{spring_runner} rails test"
else
"bundle exec ruby -I test -e 'ARGV.each {|f| require(f)}'"
end
end
|
#spring_enabled? ⇒ Boolean
168
169
170
171
172
173
|
# File 'lib/test_launcher/frameworks/minitest.rb', line 168
def spring_enabled?
return false if request.disable_spring?
return true if request.force_spring?
File.exist?(File.join(app_root, "bin/spring"))
end
|
#spring_runner ⇒ Object
175
176
177
178
179
180
181
|
# File 'lib/test_launcher/frameworks/minitest.rb', line 175
def spring_runner
if File.exist?(File.join(app_root, "bin/spring"))
"bin/spring"
else
"bundle exec spring"
end
end
|
#test_root_dir_name ⇒ Object
164
165
166
|
# File 'lib/test_launcher/frameworks/minitest.rb', line 164
def test_root_dir_name
"test"
end
|