Skip to content

Commit

Permalink
Add rake task for a console
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshCheek committed Oct 19, 2010
1 parent 042d370 commit 4c9e106
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion 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

0 comments on commit 4c9e106

Please sign in to comment.