test/functional/test.rb in ruote-0.9.20 vs test/functional/test.rb in ruote-2.1.1

- old
+ new

@@ -1,24 +1,36 @@ # -# testing Ruote +# testing ruote # # since Mon Oct 9 22:19:44 JST 2006 # -dirpath = File.dirname(__FILE__) +def l (t) -# TODO : rft_ as well... + if ARGV.include?('--split') -efts = Dir.new(dirpath).entries.select { |e| e.match(/^eft\_.*\.rb$/) }.sort - # functional tests targetting specifing expressions + _v = ARGV.include?('-v') ? ' -v' : ' ' -fts = Dir.new(dirpath).entries.select { |e| e.match(/^ft\_.*\.rb$/) }.sort - # functional tests targetting features rather than expressions + puts + puts "=== #{t} :" + puts `ruby#{_v} #{t}` -tests = efts + fts + exit $?.exitstatus if $?.exitstatus != 0 + else + load(t) + end +end -tests.each { |e| load "#{dirpath}/#{e}" } -#tests.each { |e| puts `ruby #{dirpath}/#{e}` } - # making sure that each test is runnable standalone +Dir.glob(File.join(File.dirname(__FILE__), 'ct_*.rb')).sort.each { |t| l(t) } + # concurrence/collision tests, tests about 2+ instances of ruote colliding + +Dir.glob(File.join(File.dirname(__FILE__), 'ft_*.rb')).sort.each { |t| l(t) } + # functional tests targetting features rather than expressions + +Dir.glob(File.join(File.dirname(__FILE__), 'rt_*.rb')).sort.each { |t| l(t) } + # restart tests, start sthing, stop engine, restart, expect thing to resume + +Dir.glob(File.join(File.dirname(__FILE__), 'eft_*.rb')).sort.each { |t| l(t) } + # functional tests targetting specifing expressions