code_junkie

How to output names of ruby unit tests

Nov 13th, 2011
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. require 'test/unit'
  2.  
  3. class TC_MyTest < Test::Unit::TestCase
  4. def test_something
  5. assert(true)
  6. end
  7. end
  8.  
  9. Loaded suite C:/test
  10. Started
  11. .
  12. Finished in 0.0 seconds.
  13.  
  14. 1 tests, 1 assertions, 0 failures, 0 errors
  15.  
  16. Loaded suite C:/test
  17. Started
  18. test_something
  19. .
  20. Finished in 0.0 seconds.
  21.  
  22. 1 tests, 1 assertions, 0 failures, 0 errors
  23.  
  24. test.rb -v v
  25.  
  26. test.rb --verbose=verbose
  27.  
  28. Loaded suite C:/test
  29. Started
  30. test_something(TC_MyTest): .
  31.  
  32. Finished in 0.0 seconds.
  33.  
  34. 1 tests, 1 assertions, 0 failures, 0 errors
  35.  
  36. Test::Unit::UI::Console::TestRunner.run(TC_MyTest)
  37.  
  38. Test::Unit::UI::Console::TestRunner.run(TC_MyTest, 3)
  39.  
  40. rake test TESTOPTS=-v
Add Comment
Please, Sign In to add comment