Rakefile in symmetric-encryption-3.8.3 vs Rakefile in symmetric-encryption-3.9.0

- old
+ new

@@ -1,11 +1,12 @@ -require 'rake/clean' +# Setup bundler to avoid having to run bundle exec all the time. +require 'rubygems' +require 'bundler/setup' + require 'rake/testtask' +require_relative 'lib/symmetric_encryption/version' -$LOAD_PATH.unshift File.expand_path('../lib', __FILE__) -require 'symmetric_encryption/version' - task :gem do system 'gem build symmetric-encryption.gemspec' end task :publish => :gem do @@ -13,19 +14,18 @@ system 'git push --tags' system "gem push symmetric-encryption-#{SymmetricEncryption::VERSION}.gem" system "rm symmetric-encryption-#{SymmetricEncryption::VERSION}.gem" end -desc 'Run Test Suite' -task :test do - Rake::TestTask.new(:functional) do |t| - t.test_files = FileList['test/*_test.rb'] - t.verbose = true - end - - # For mongoid - ENV['RACK_ENV'] = 'test' - - Rake::Task['functional'].invoke +Rake::TestTask.new(:test) do |t| + t.pattern = 'test/**/*_test.rb' + t.verbose = true + t.warning = false end -task :default => :test +# By default run tests against all appraisals +if !ENV["APPRAISAL_INITIALIZED"] && !ENV["TRAVIS"] + require 'appraisal' + task default: :appraisal +else + task default: :test +end