Class: TestLauncher::Frameworks::ExUnit::Runner

Inherits:
Base::Runner
  • Object
show all
Defined in:
lib/test_launcher/frameworks/ex_unit.rb

Instance Method Summary collapse

Methods inherited from Base::Runner

#multiple_examples, #multiple_files, #single_file

Instance Method Details

#by_line_number(test_case) ⇒ Object



52
53
54
# File 'lib/test_launcher/frameworks/ex_unit.rb', line 52

def (test_case)
  %{cd #{test_case.app_root} && mix test #{test_case.file}:#{test_case.line_number}}
end

#multiple_examples_same_file(test_cases) ⇒ Object



60
61
62
# File 'lib/test_launcher/frameworks/ex_unit.rb', line 60

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



64
65
66
# File 'lib/test_launcher/frameworks/ex_unit.rb', line 64

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



68
69
70
# File 'lib/test_launcher/frameworks/ex_unit.rb', line 68

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



56
57
58
# File 'lib/test_launcher/frameworks/ex_unit.rb', line 56

def single_example(test_case)
  (test_case)
end