test.rb 852 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. ##
  2. ## $Release: 2.7.0 $
  3. ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
  4. ##
  5. unless defined?(TESTDIR)
  6. TESTDIR = File.dirname(__FILE__)
  7. LIBDIR = TESTDIR == '.' ? '../lib' : File.dirname(TESTDIR) + '/lib'
  8. $: << TESTDIR
  9. $: << LIBDIR
  10. end
  11. require 'test/unit'
  12. #require 'test/unit/ui/console/testrunner'
  13. require 'assert-text-equal'
  14. require 'yaml'
  15. require 'testutil'
  16. require 'erubis'
  17. Test::Unit::TestCase.class_eval do
  18. if RUBY_VERSION >= "1.9"
  19. ## minitest doesn't have 'name()' method
  20. def name
  21. @name || @__name__
  22. end
  23. def ruby19
  24. yield
  25. end
  26. else
  27. def ruby19
  28. end
  29. end
  30. end
  31. if $0 == __FILE__
  32. require "#{TESTDIR}/test-erubis.rb"
  33. require "#{TESTDIR}/test-engines.rb"
  34. require "#{TESTDIR}/test-enhancers.rb"
  35. require "#{TESTDIR}/test-main.rb"
  36. require "#{TESTDIR}/test-users-guide.rb"
  37. end