Sha256: 3ed037e32517bcc0378841c9a54fca1dccfd3b6968a18cdde91891335fd5c68e
Contents?: true
Size: 999 Bytes
Versions: 2
Compression:
Stored size: 999 Bytes
Contents
require 'appraisal' require 'baldwin' require 'rspec/core/rake_task' include Rake::DSL namespace :baldwin do desc "Set up current environment variables" task :env do Baldwin.env! end desc "Remove all test rails apps" task :clean => [ :env ] do Baldwin.apps.each { |app| app.rmdir :force => true } end desc "Create a test rails app if necessary" task :rails => [ :env ] do if File.exist? ENV[ 'BALDWIN_RAILS_PATH' ] puts "Using existing #{ENV[ 'BALDWIN_RAILS_NAME' ]} app" else sh "bundle exec rails new #{ENV[ 'BALDWIN_RAILS_PATH' ]} -m spec/rails/rails_template.rb" end end desc "Install testing awesomeness" task :install do Baldwin::Installer.start end end RSpec::Core::RakeTask.new :rspec => [ :'baldwin:env', :'baldwin:rails' ] desc "Run specs for all supported rails versions" task :spec => :rspec desc "Default: Clean, install dependencies, and run specs" task :default => [ :'baldwin:clean', :'appraisal:install', :spec ]
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
baldwin-0.2.3 | lib/baldwin/gem_tasks.rb |
baldwin-0.2.2 | lib/baldwin/gem_tasks.rb |