.autotest in ms-sequest-0.0.17 vs .autotest in ms-sequest-0.0.18
- old
+ new
@@ -1,14 +1,30 @@
# -*- ruby -*-
-Autotest.add_hook :initialize do |at|
- at.clear_mappings
-end
+require 'rubygems'
+require 'spec/more'
+require 'autotest/bacon'
+#require 'redgreen/autotest'
-Autotest.add_hook :initialize do |at|
-at.add_mapping(%r%^lib/(.*)\.rb$%) { |_, m|
- #["spec/#{m[1]}_spec.rb"]
- #["test/#{m[1]}_test.rb"]
- ## for both specs and tests:
- ["spec/#{m[1]}_spec.rb","test/#{m[1]}_test.rb"]
-}
+class Autotest::Bacon < Autotest
+ undef make_test_cmd
+ def make_test_cmd(files_to_test)
+ args = files_to_test.keys.flatten.join(' ')
+ args = '-a' if args.empty?
+ # TODO : make regex to pass to -n using values
+ "#{ruby} -S bacon -I#{libs} -o TestUnit #{args}"
+ end
end
+
+
+#Autotest.add_hook :initialize do |at|
+# at.clear_mappings
+#end
+
+#Autotest.add_hook :initialize do |at|
+#at.add_mapping(%r%^lib/(.*)\.rb$%) { |_, m|
+# #["spec/#{m[1]}_spec.rb"]
+# #["test/#{m[1]}_test.rb"]
+# ## for both specs and tests:
+# ["spec/#{m[1]}_spec.rb"]
+#}
+#end