Sha256: 76df401ffa65e1e302886e803fb3ab927d8740b2787197d4e54fda415b1ba53a

Contents?: true

Size: 756 Bytes

Versions: 2

Compression:

Stored size: 756 Bytes

Contents

require "bundler/gem_tasks"
require "rspec/core/rake_task"

RSpec::Core::RakeTask.new(:spec)

RAILS_VERSIONS = [
  "4.2.6"
]

def run_tests_for_version(version)
  commands = []

  commands << "rm Gemfile.lock"
  commands << "gem install rails -v #{version}"
  commands << "bundle install"
  commands << "bundle exec rspec"

  system({'RAILS_VERSION' => version}, commands.join(' && '))
end

task :all do
  RAILS_VERSIONS.each do |version|
    puts "Testing gem for rails version: #{version}"
    success = run_tests_for_version(version)

    unless success
      puts "Test suite aborted, errors occured."
      exit($?.exitstatus)
    end
  end
end

# task :default do
#   run_tests_for_version(ENV['RAILS_VERSION'] || '4.2.6')
# end

task default: :spec

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cp-sparrow-0.0.16 Rakefile
cp-sparrow-0.0.15 Rakefile