aboutsummaryrefslogtreecommitdiff
path: root/cli/Rakefile
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2012-10-09 00:01:55 -0700
committerelijah <elijah@riseup.net>2012-10-09 00:01:55 -0700
commit578ac2f5dc7432317d7a022bed9d869ab89ee45c (patch)
tree3cf8d27c2e8059df33e33e9c39146e0b3db29599 /cli/Rakefile
parent105fe22c2de06310e48c4827b47d38d18750ed32 (diff)
downloadleap_cli-578ac2f5dc7432317d7a022bed9d869ab89ee45c.tar.gz
leap_cli-578ac2f5dc7432317d7a022bed9d869ab89ee45c.tar.bz2
initial code commit
Diffstat (limited to 'cli/Rakefile')
-rw-r--r--cli/Rakefile44
1 files changed, 44 insertions, 0 deletions
diff --git a/cli/Rakefile b/cli/Rakefile
new file mode 100644
index 0000000..c97688b
--- /dev/null
+++ b/cli/Rakefile
@@ -0,0 +1,44 @@
+require 'rake/clean'
+require 'rubygems'
+require 'rubygems/package_task'
+require 'rdoc/task'
+require 'cucumber'
+require 'cucumber/rake/task'
+Rake::RDocTask.new do |rd|
+ rd.main = "README.rdoc"
+ rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
+ rd.title = 'Your application title'
+end
+
+spec = eval(File.read('leap_cli.gemspec'))
+
+Gem::PackageTask.new(spec) do |pkg|
+end
+CUKE_RESULTS = 'results.html'
+CLEAN << CUKE_RESULTS
+desc 'Run features'
+Cucumber::Rake::Task.new(:features) do |t|
+ opts = "features --format html -o #{CUKE_RESULTS} --format progress -x"
+ opts += " --tags #{ENV['TAGS']}" if ENV['TAGS']
+ t.cucumber_opts = opts
+ t.fork = false
+end
+
+desc 'Run features tagged as work-in-progress (@wip)'
+Cucumber::Rake::Task.new('features:wip') do |t|
+ tag_opts = ' --tags ~@pending'
+ tag_opts = ' --tags @wip'
+ t.cucumber_opts = "features --format html -o #{CUKE_RESULTS} --format pretty -x -s#{tag_opts}"
+ t.fork = false
+end
+
+task :cucumber => :features
+task 'cucumber:wip' => 'features:wip'
+task :wip => 'features:wip'
+require 'rake/testtask'
+Rake::TestTask.new do |t|
+ t.libs << "test"
+ t.test_files = FileList['test/*_test.rb']
+end
+
+task :default => [:test,:features]