Guest User

Untitled

a guest
Apr 20th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. $ cat mu_1
  2. require 'miniunit'
  3.  
  4. include Test::Unit::Assertions
  5.  
  6. def foo(a)
  7. assert_instance_of String, a, "testing argument 'a'"
  8. puts a
  9. end
  10.  
  11. begin
  12. foo(1)
  13. rescue => e
  14. puts "\n#{e.inspect}"
  15. end
  16.  
  17. begin
  18. foo(nil)
  19. rescue => e
  20. puts "\n#{e.inspect}"
  21. end
  22.  
  23. exit
  24.  
  25.  
  26.  
  27. $ mu_1
  28. mu_1:1:in `require': no such file to load --
  29. miniunit (LoadError) from mu_1:1
Add Comment
Please, Sign In to add comment