Sha256: 8d4e6a6aadd3a8efbe2644389bfdeb94b9f2593d21b684dc7d868dd52f4727ba
Contents?: true
Size: 774 Bytes
Versions: 3
Compression:
Stored size: 774 Bytes
Contents
require "bundler/gem_tasks" require "rspec/core/rake_task" def run_batches(batches) failed = false batches.each do |batch| begin Rake::Task["spec:batch#{batch}"].invoke rescue SystemExit failed = true end end exit 1 if failed end task :part1 do run_batches(1..2) end task :part2 do run_batches(3..4) end task :part3 do run_batches(5..7) end task :spec do run_batches(1..7) end namespace :spec do task :prepare do sh %(cd spec/test_app; rm db/schema.rb; RAILS_ENV=test bundle exec rails db:setup; RAILS_ENV=test bundle exec rails db:migrate) end (1..7).each do |batch| RSpec::Core::RakeTask.new(:"batch#{batch}") do |t| t.pattern = "spec/batch#{batch}/**/*_spec.rb" end end end task :default => :spec
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hyper-model-1.0.alpha1.8 | Rakefile |
hyper-model-1.0.alpha1.7 | Rakefile |
hyper-model-1.0.alpha1.6 | Rakefile |