Class: TestLauncher::Frameworks::ExUnit::Runner
Instance Method Summary
collapse
#initialize, #multiple_examples, #multiple_files, #single_file
Instance Method Details
#by_line_number(test_case) ⇒ Object
51
52
53
|
# File 'lib/test_launcher/frameworks/ex_unit.rb', line 51
def by_line_number(test_case)
%{cd #{test_case.app_root} && mix test #{test_case.file}:#{test_case.line_number}}
end
|
#multiple_examples_same_file(test_cases) ⇒ Object
59
60
61
|
# File 'lib/test_launcher/frameworks/ex_unit.rb', line 59
def multiple_examples_same_file(test_cases)
one_or_more_files(test_cases.uniq {|tc| tc.file})
end
|
#multiple_examples_same_root(test_cases) ⇒ Object
63
64
65
|
# File 'lib/test_launcher/frameworks/ex_unit.rb', line 63
def multiple_examples_same_root(test_cases)
one_or_more_files(test_cases.uniq {|tc| tc.file})
end
|
#one_or_more_files(test_cases) ⇒ Object
67
68
69
|
# File 'lib/test_launcher/frameworks/ex_unit.rb', line 67
def one_or_more_files(test_cases)
%{cd #{test_cases.first.app_root} && mix test #{test_cases.map(&:file).join(" ")}}
end
|
#single_example(test_case) ⇒ Object
55
56
57
|
# File 'lib/test_launcher/frameworks/ex_unit.rb', line 55
def single_example(test_case)
by_line_number(test_case)
end
|