Permalink
Browse files

Re-exec with the local copy of rake to ensure the we're testing our code

  • Loading branch information...
1 parent 15c309a commit 922da4c41e925609f02fab6c25e35271c7614dc8 @drbrain drbrain committed Feb 14, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 Rakefile
View
@@ -6,8 +6,18 @@
# This file may be distributed under an MIT style license. See
# MIT-LICENSE for details.
+require 'rbconfig'
require 'rubygems'
+
+system_rake = File.join RbConfig::CONFIG['rubylibdir'], 'rake.rb'
+
+# Use our rake, not the installed rake from system
+if $".include? system_rake then
+ exec Gem.ruby, '-Ilib', 'bin/rake', *ARGV
+end
+
require 'rubygems/package_task'
+
require 'rake/clean'
require 'rake/testtask'

0 comments on commit 922da4c

Please sign in to comment.