[Rake-devel] Option handling in rake_test_loader.rb

Greg Fast gdf at speakeasy.net
Fri Aug 19 08:28:17 EDT 2005


Jim,

Here's a tiny patch to rake_test_loader.rb that makes it ignore command 
line options.  As it is now, you can't do things like `rake test 
TESTOPTS="--runner=fox"`, since it tries to load() "--runner=fox".

-- 
Greg Fast
gdf at speakeasy.net
http://cken.chi.groogroo.com/
-------------- next part --------------
? rake_test_loader.patch
Index: lib/rake/rake_test_loader.rb
===================================================================
RCS file: /var/cvs/rake/rake/lib/rake/rake_test_loader.rb,v
retrieving revision 1.1
diff -u -r1.1 rake_test_loader.rb
--- lib/rake/rake_test_loader.rb	31 Mar 2005 04:44:02 -0000	1.1
+++ lib/rake/rake_test_loader.rb	19 Aug 2005 12:15:07 -0000
@@ -2,4 +2,4 @@
 
 # Load the test files from the command line.
 
-ARGV.each { |f| load f }
+ARGV.each { |f| load f unless f =~ /^-/ }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdf.vcf
Type: text/x-vcard
Size: 267 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/rake-devel/attachments/20050819/c77290fe/gdf-0001.vcf


More information about the Rake-devel mailing list