Rakefile in boxes-2.5.0 vs Rakefile in boxes-3.0.0

- old
+ new

@@ -1,34 +1,29 @@ -#!/usr/bin/env rake - begin - require 'bundler/setup' + require "bundler/setup" rescue LoadError - puts 'You must `gem install bundler` and `bundle install` to run rake tasks' + puts "You must `gem install bundler` and `bundle install` to run rake tasks" end -require 'bundler/gem_tasks' +require "bundler/gem_tasks" ## # Configure the test suite. ## -require 'rspec/core' -require 'rspec/core/rake_task' +require "rspec/core" +require "rspec/core/rake_task" -RSpec::Core::RakeTask.new +task(:spec).clear +desc "Run specs other than spec/acceptance" +RSpec::Core::RakeTask.new("spec") do |task| + task.exclude_pattern = "spec/acceptance/**/*_spec.rb" + task.verbose = false +end -## -# Cucumber for feature testing. -## -require 'rake/clean' -require 'cucumber' -require 'cucumber/rake/task' - -Cucumber::Rake::Task.new(:features) do |t| - t.cucumber_opts = 'features --format pretty -x' - t.fork = false +desc "Run acceptance specs in spec/acceptance" +RSpec::Core::RakeTask.new("spec:acceptance") do |task| + task.pattern = "spec/acceptance/**/*_spec.rb" + task.verbose = false end -## -# By default, just run the tests. -## -task default: :spec +desc "Run the specs and acceptance tests" +task default: %w(spec spec:acceptance)