Permalink
Browse files

Rake Smarter™

  • Loading branch information...
1 parent ea41038 commit 95ecbce0ca017b04cb40e5da8156deab88ecf6ec @bkerley committed Jul 1, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 Rakefile
View
13 Rakefile
@@ -3,8 +3,21 @@ require 'rake'
require 'rake/testtask'
require "bundler/gem_tasks"
+task :default => :test
+
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/*_test.rb'
test.verbose = true
end
+
+task :test => :riak_running
+
+task :riak_running do
+ begin
+ sh 'curl -s localhost:8091 > /dev/null'
+ rescue => e
+ puts "Couldn't see that Riak is running on port 8091. Sad trombone. :("
+ raise e
+ end
+end

0 comments on commit 95ecbce

Please sign in to comment.