From 3e499c0f1b8a5fd97f607e7850223befb69d342c Mon Sep 17 00:00:00 2001 From: Stephen Caudill <scaudill@gmail.com> Date: Sat, 25 Sep 2010 21:29:42 -0400 Subject: [PATCH] Hack the rake tasks to run cucumber + rspec --- Rakefile | 1 + lib/tasks/cucumber.rake | 10 ++++++---- lib/tasks/rspec.rake | 3 --- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Rakefile b/Rakefile index c9b50786e2..f00478e2e2 100644 --- a/Rakefile +++ b/Rakefile @@ -10,4 +10,5 @@ require File.expand_path('../config/application', __FILE__) require 'rake' ENV['GNUPGHOME'] = File.expand_path("../../gpg/diaspora-#{Rails.env}/", __FILE__) + Diaspora::Application.load_tasks diff --git a/lib/tasks/cucumber.rake b/lib/tasks/cucumber.rake index 7db1a55704..15d405ad4c 100644 --- a/lib/tasks/cucumber.rake +++ b/lib/tasks/cucumber.rake @@ -14,19 +14,19 @@ begin require 'cucumber/rake/task' namespace :cucumber do - Cucumber::Rake::Task.new({:ok => 'db:test:prepare'}, 'Run features that should pass') do |t| + Cucumber::Rake::Task.new(:ok, 'Run features that should pass') do |t| t.binary = vendored_cucumber_bin # If nil, the gem's binary is used. t.fork = true # You may get faster startup if you set this to false t.profile = 'default' end - Cucumber::Rake::Task.new({:wip => 'db:test:prepare'}, 'Run features that are being worked on') do |t| + Cucumber::Rake::Task.new(:wip, 'Run features that are being worked on') do |t| t.binary = vendored_cucumber_bin t.fork = true # You may get faster startup if you set this to false t.profile = 'wip' end - Cucumber::Rake::Task.new({:rerun => 'db:test:prepare'}, 'Record failing features and run only them if any exist') do |t| + Cucumber::Rake::Task.new(:rerun, 'Record failing features and run only them if any exist') do |t| t.binary = vendored_cucumber_bin t.fork = true # You may get faster startup if you set this to false t.profile = 'rerun' @@ -38,7 +38,9 @@ begin desc 'Alias for cucumber:ok' task :cucumber => 'cucumber:ok' - task :default => :cucumber + Rake.application.instance_variable_get('@tasks').delete('default') + + task :default => [:cucumber, :spec] task :features => :cucumber do STDERR.puts "*** The 'features' task is deprecated. See rake -T cucumber ***" diff --git a/lib/tasks/rspec.rake b/lib/tasks/rspec.rake index 85ae513f6d..35f0b8a98f 100644 --- a/lib/tasks/rspec.rake +++ b/lib/tasks/rspec.rake @@ -32,13 +32,10 @@ MSG end end -Rake.application.instance_variable_get('@tasks').delete('default') - spec_prereq = Rails.root.join('config', 'database.yml').exist? ? "db:test:prepare" : :noop task :noop do end -task :default => :spec task :stats => "spec:statsetup" desc "Run all specs in spec directory (excluding plugin specs)" -- GitLab