From 596e1d8fadde4ec510f5b822ca13a585deb62354 Mon Sep 17 00:00:00 2001 From: Ken Barber Date: Tue, 11 Oct 2011 20:18:01 +0100 Subject: [PATCH] (#10026) Add aliases for test,specs,tests to Rakefile and provide -T as default. I've cleaned up the Rakefile a bit so that the aliases: * test * specs * tests Now point to "spec". The (s) versions are used by rvm but generally these are all provided for convenience in case someone uses the wrong form. I've also changed the default rake task to show the list of tasks (rake -T). The description for rake spec is also a bit longer. --- Rakefile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index 322aa57..cac9471 100644 --- a/Rakefile +++ b/Rakefile @@ -1,10 +1,17 @@ require 'rake' require 'rspec/core/rake_task' -task :default => [:test] +task :default do + sh %{rake -T} +end + +# Aliases for spec. The (s) versions are used by rvm specs/tests. +task :test => [:spec] +task :tests => [:spec] +task :specs => [:spec] -desc 'Run RSpec' -RSpec::Core::RakeTask.new(:test) do |t| +desc 'Run all RSpec tests' +RSpec::Core::RakeTask.new(:spec) do |t| t.rspec_opts = ['--color'] end -- 2.45.2