Revision
1179
Author
eloy.de.enige@gmail.com
Date
2009-03-26 15:55:39 -0700 (Thu, 26 Mar 2009)

Log Message

Added spec:green task which is as the old spec:ci task was; it only runs the files in KNOWN_GOOD which should all pass. The new spec:ci task will run _all_ examples across KNOWN_GOOD & KNOWN_PARTIALLY_GOOD files.

Modified Paths

Diff

Modified: MacRuby/branches/experimental/rakelib/spec.rake (1178 => 1179)


--- MacRuby/branches/experimental/rakelib/spec.rake	2009-03-26 22:55:32 UTC (rev 1178)
+++ MacRuby/branches/experimental/rakelib/spec.rake	2009-03-26 22:55:39 UTC (rev 1179)
@@ -2,24 +2,15 @@
   KNOWN_GOOD = %w{
     and
     array
-    block
-    break
     case
-    catch
-    class
     class_variable
-    def
     defined
-    eigenclass
     else
-    encoding
-    ensure
     execution
     file
     hash
     if
     line
-    loop
     module
     numbers
     not
@@ -33,9 +24,28 @@
     while
   }
   
-  desc "Run continuous integration language examples (known good)"
+  KNOWN_PARTIALLY_GOOD = %w{
+    block
+    break
+    catch
+    class
+    def
+    eigenclass
+    encoding
+    ensure
+    loop
+  }
+  
+  MSPEC_RUN = "./miniruby -v -I./mspec/lib -I./lib ./mspec/bin/mspec-run"
+  
+  desc "Run all spec files should be fully green (known good)"
+  task :green do
+    sh "#{MSPEC_RUN} #{FileList["spec/frozen/language/{#{KNOWN_GOOD.join(',')}}_spec.rb"].join(' ')}"
+  end
+  
+  desc "Run continuous integration language examples (all known good examples)"
   task :ci do
-    files = FileList["spec/frozen/language/{#{KNOWN_GOOD.join(',')}}_spec.rb"]
+    files = FileList["spec/frozen/language/{#{(KNOWN_GOOD + KNOWN_PARTIALLY_GOOD).join(',')}}_spec.rb"]
     sh "./mspec/bin/mspec ci -B ./spec/frozen/macruby.mspec #{files.join(' ')}"
   end