Sha256: 8858a1e79dd216a001764951b7795752216f29529cf2903b0ec56e341d7a8960
Contents?: true
Size: 1.16 KB
Versions: 2
Compression:
Stored size: 1.16 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 WITH_MONGOID=1 to use mongoid. 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 with_mongoid = ENV["WITH_MONGOID"] ? "--with-mongoid" : "" sh 'ruby', 'bin/da-suspenders', 'create', TEST_PROJECT, with_mongoid, 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.2 | Rakefile |
da-suspenders-1.2.1 | Rakefile |