From 881b72a6d11d62799fe410198e13ec8041cde24c Mon Sep 17 00:00:00 2001 From: Will Daly Date: Fri, 10 May 2013 10:35:51 -0400 Subject: [PATCH] Added option to run a specific feature --- rakefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rakefile b/rakefile index 9fd5ea7279..55ac9ce64d 100644 --- a/rakefile +++ b/rakefile @@ -243,9 +243,9 @@ def run_tests(system, report_dir, stop_on_failure=true) end end -def run_acceptance_tests(system, report_dir) +def run_acceptance_tests(system, report_dir, feature_path) ENV['NOSE_XUNIT_FILE'] = File.join(report_dir, 'acceptance_tests.xml') - sh(django_admin(system, 'acceptance', 'harvest', '--debug-mode')) + sh(django_admin(system, 'acceptance', 'harvest', '--debug-mode', feature_path)) end @@ -273,8 +273,9 @@ end # Run acceptance tests desc "Run acceptance tests" - task "test_acceptance" => ["clean_test_files", "#{system}:gather_assets:acceptance", :predjango, report_dir] do - run_acceptance_tests(system, report_dir) + task "test_acceptance", [:feature_path] => ["clean_test_files", :predjango, report_dir] do |t, args| + args.with_defaults(:feature_path => '') + run_acceptance_tests(system, report_dir, args.feature_path) end task :fasttest => "fasttest_#{system}"