Class: TestLauncher::Frameworks::Minitest::TestCase
Instance Attribute Summary
#example, #file, #line_number, #request
Instance Method Summary
collapse
#app_root, #exploded_path, from_search, #initialize, #is_example?, #mtime, #test_root
Instance Method Details
#example_runner ⇒ Object
132
133
134
135
136
137
138
|
# File 'lib/test_launcher/frameworks/minitest.rb', line 132
def example_runner
if spring_enabled?
"bundle exec spring rake test"
else
"bundle exec ruby -I test"
end
end
|
#file_runner ⇒ Object
140
141
142
143
144
145
146
|
# File 'lib/test_launcher/frameworks/minitest.rb', line 140
def file_runner
if spring_enabled?
"bundle exec spring rake test"
else
"bundle exec ruby -I test -e 'ARGV.each {|f| require(f)}'"
end
end
|
#spring_enabled? ⇒ Boolean
152
153
154
155
156
157
158
159
160
161
162
|
# File 'lib/test_launcher/frameworks/minitest.rb', line 152
def spring_enabled?
return false if request.disable_spring?
return true if request.force_spring?
[
"bin/spring",
"bin/testunit"
].any? {|f|
File.exist?(File.join(app_root, f))
}
end
|
#test_root_dir_name ⇒ Object
148
149
150
|
# File 'lib/test_launcher/frameworks/minitest.rb', line 148
def test_root_dir_name
"test"
end
|