]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
(#10026) Add aliases for test,specs,tests to Rakefile and provide -T as default.
authorKen Barber <ken@bob.sh>
Tue, 11 Oct 2011 19:18:01 +0000 (20:18 +0100)
committerKen Barber <ken@bob.sh>
Tue, 11 Oct 2011 19:18:01 +0000 (20:18 +0100)
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

index 322aa5767fe913fe1fb58058eaf051dbc7c81b77..cac94718b5f8dba975d560cbd4ae7c6ca5715861 100644 (file)
--- 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