Sha256: d98b3d61f2da77dbdda539d79965596f8e364ee26f1335dcb72a28cfd54a0baa
Contents?: true
Size: 1.05 KB
Versions: 2
Compression:
Stored size: 1.05 KB
Contents
require "bundler" require "cucumber/rake/task" Bundler::GemHelper.install_tasks ############################################################################# # # Testing functions # ############################################################################# Cucumber::Rake::Task.new TEST_PROJECT = "test_project" namespace :test do desc "A full suspenders app's test suite" task :full => ['test_project:generate', 'cucumber', 'test_project:destroy'] end namespace :test_project do desc 'Suspend a new project. Pass REPO=... to change the Suspenders repo (defaults to dir with Rakefile).' task :generate do FileUtils.rm_rf(TEST_PROJECT) repo = (ENV['REPO'] || "file://#{Dir.pwd}").to_s sh 'ruby', 'bin/da-suspenders', 'create', TEST_PROJECT, repo end desc 'Remove a suspended project' task :destroy do FileUtils.cd TEST_PROJECT sh "rake db:drop RAILS_ENV=development" sh "rake db:drop RAILS_ENV=test" FileUtils.cd '..' FileUtils.rm_rf TEST_PROJECT end end desc 'Run the test suite' task :default => ['test:full']
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
da-suspenders-1.2.0 | Rakefile |
da-suspenders-1.1.0 | Rakefile |