Class: MiniTest::Unit::TestCase

Inherits:
Object
  • Object
show all
Defined in:
lib/shoulda_list_runner.rb

Instance Method Summary collapse

Instance Method Details

#run(runner) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/shoulda_list_runner.rb', line 19

def run runner
  test_name = if respond_to?(:name)
                name
              elsif respond_to?(:__name__)
                __name__
              end
  result = run_before_shoulda_runner(runner)
  if result == '.'
    ShouldaAddons::Color.green(test_name.gsub(/test: /, "")) + "\n"
  else
    ShouldaAddons::Color.red(test_name.gsub(/test: /, "")) + "\n"
  end
end

#run_before_shoulda_runnerObject



17
# File 'lib/shoulda_list_runner.rb', line 17

alias_method :run_before_shoulda_runner, :run