From: Ken Barber Date: Tue, 11 Oct 2011 19:18:01 +0000 (+0100) Subject: (#10026) Add aliases for test,specs,tests to Rakefile and provide -T as default. X-Git-Tag: v0.0.1~2^2~1 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=596e1d8fadde4ec510f5b822ca13a585deb62354;p=puppet-modules%2Fpuppetlabs-firewall.git (#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. --- 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