Permalink
Browse files

Ruote::Exp:: for concurrence tests as well

  • Loading branch information...
jmettraux committed Aug 19, 2009
1 parent e655aed commit 2a81f5029db299487ddaa3132bed81a832b0302a
Showing with 15 additions and 28 deletions.
  1. +3 −1 Rakefile
  2. +2 −0 TODO.txt
  3. +2 −2 test/functional/ct_0_concurrence.rb
  4. +6 −14 test/functional/test.rb
  5. +2 −11 test/unit/test.rb
View
@@ -21,7 +21,9 @@ task :default => [ :clean, :repackage ]
task :rdoc do
sh %{
rm -fR ruote_rdoc
- yardoc 'lib/**/*.rb' -o ruote_rdoc --title 'ruote 2.0'
+ yardoc 'lib/**/*.rb' \
+ -o ruote_rdoc \
+ --title 'ruote 2.0'
}
end
#task :exp_rdoc do
View
@@ -180,3 +180,5 @@ restart tests :
[ ] concurrence / concurrent_iterator merge plugin ?
+[ ] one file, no multi-process, persistence ?
+
@@ -129,7 +129,7 @@ def start_new_engine
def change_concurrence_expression
- Ruote::ConcurrenceExpression.module_eval do
+ Ruote::Exp::ConcurrenceExpression.module_eval do
alias :original_persist :persist
def persist (probe=false)
sleep 0.010
@@ -140,7 +140,7 @@ def persist (probe=false)
def unchange_concurrence_expression
- Ruote::ConcurrenceExpression.module_eval do
+ Ruote::Exp::ConcurrenceExpression.module_eval do
alias :persist :original_persist
end
end
View
@@ -5,26 +5,18 @@
# since Mon Oct 9 22:19:44 JST 2006
#
-dirpath = File.dirname(__FILE__)
# TODO : rft_ as well...
-efts = Dir.new(dirpath).entries.select { |e| e.match(/^eft\_.*\.rb$/) }.sort
- # functional tests targetting specifing expressions
+Dir.glob(File.join(File.dirname(__FILE__), 'ct_*.rb')).sort.each { |t| load(t) }
+ # concurrence/collision tests, tests about 2+ instances of ruote colliding
-fts = Dir.new(dirpath).entries.select { |e| e.match(/^ft\_.*\.rb$/) }.sort
+Dir.glob(File.join(File.dirname(__FILE__), 'ft_*.rb')).sort.each { |t| load(t) }
# functional tests targetting features rather than expressions
-rts = Dir.new(dirpath).entries.select { |e| e.match(/^rt\_.*\.rb$/) }.sort
+Dir.glob(File.join(File.dirname(__FILE__), 'rt_*.rb')).sort.each { |t| load(t) }
# restart tests, start sthing, stop engine, restart, expect thing to resume
-cts = Dir.new(dirpath).entries.select { |e| e.match(/^ct\_.*\.rb$/) }.sort
- # concurrence/collision tests, tests about 2+ instances of ruote colliding
-
-tests = efts + fts + rts
-
-tests.each { |e| load(File.join(dirpath, e)) }
-
-#tests.each { |e| puts `ruby #{dirpath}/#{e}` }
- # making sure that each test is runnable standalone
+Dir.glob(File.join(File.dirname(__FILE__), 'eft_*.rb')).sort.each { |t| load(t) }
+ # functional tests targetting specifing expressions
View
@@ -5,15 +5,6 @@
# since Mon Oct 9 22:19:44 JST 2006
#
-dirpath = File.dirname(__FILE__)
-
-uts = Dir.new(dirpath).entries.select { |e| e.match(/^ut\_.*\.rb$/) }.sort
-huts = Dir.new(dirpath).entries.select { |e| e.match(/^hut\_.*\.rb$/) }.sort
-
-tests = uts + huts
-
-tests.each { |e| load(File.join(dirpath, e)) }
-
-#tests.each { |e| puts `ruby #{dirpath}/#{e}` }
- # making sure that each test is runnable standalone
+Dir.glob(File.join(File.dirname(__FILE__), 'ut_*.rb')).sort.each { |t| load(t) }
+Dir.glob(File.join(File.dirname(__FILE__), 'hut_*.rb')).sort.each { |t| load(t) }

0 comments on commit 2a81f50

Please sign in to comment.