require 'bundler/setup' require 'bundler/gem_tasks' require 'rspec/core/rake_task' require 'cucumber/rake/task' require 'appraisal' RSpec::Core::RakeTask.new do |t| t.pattern = "spec/**/*_spec.rb" t.rspec_opts = '--color --format progress' t.verbose = false end Cucumber::Rake::Task.new do |t| t.fork = false t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'progress')] end task :default do if ENV['BUNDLE_GEMFILE'] =~ /gemfiles/ Rake::Task['spec'].invoke Rake::Task['cucumber'].invoke else Rake::Task['appraise'].invoke end end task :appraise do exec 'appraisal install && appraisal rake' end