From 4c9e106b7de44932bce9d69c6b365be8c95cfb13 Mon Sep 17 00:00:00 2001 From: Josh Cheek Date: Tue, 19 Oct 2010 02:27:33 -0500 Subject: [PATCH] Add rake task for a console --- Rakefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 44a4069..07d3c34 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,15 @@ -task :default do +task :default => :test + +desc 'run the unit tests' +task :test do query = File.dirname(__FILE__) << '/test/*.test.rb' Dir[query].each { |filename| require filename } +end + +desc 'irb session with env loaded' +task :console do + dir = File.dirname(__FILE__) + requirements = String.new + requirements << "-r #{dir}/test/_helper.rb" + system "irb #{requirements}" end \ No newline at end of file