Sha256: 50fb725a13714c3773a77d77b8eff15a9d2a7353abff12239b6554ec86d9cf93

Contents?: true

Size: 1.5 KB

Versions: 4

Compression:

Stored size: 1.5 KB

Contents

desc "Creates a test rails app for the specs to run against"
task :setup do
  require 'rails/version'
  system("mkdir spec/rails") unless File.exists?("spec/rails")
  system "bundle exec rails new spec/rails/rails-#{Rails::VERSION::STRING} -m spec/support/rails_template.rb"
end

namespace :test do
  desc "Run against the important versions of rails"
  task :major_rails_versions do
    current_version = detect_rails_version if File.exists?("Gemfile.lock")
    ["3.0.10", "3.1.0"].each do |version|
      puts
      puts
      puts "== Using Rails #{version}"
      cmd "./script/use_rails #{version}"
      cmd "bundle exec rspec spec/unit"
      cmd "bundle exec rspec spec/integration"
      cmd "bundle exec cucumber features"
    end
    cmd "./script/use_rails #{current_version}" if current_version
  end

end

# Run specs and cukes
task :test do
  cmd "bundle exec rspec spec/unit"
  cmd "bundle exec rspec spec/integration"
  cmd "bundle exec cucumber features"
end

namespace :spec do
  desc "Run specs for all versions of rails"
  task :all do
    (0..6).to_a.each do |v|
      puts "Running for Rails 3.0.#{v}"
      cmd "rm Gemfile.lock" if File.exists?("Gemfile.lock")
      cmd "/usr/bin/env RAILS=3.0.#{v} bundle install"
      cmd "/usr/bin/env RAILS=3.0.#{v} rake spec"
    end
  end
end

require 'cucumber/rake/task'

namespace :cucumber do
  Cucumber::Rake::Task.new(:all) do |t|
    t.profile = 'default'
  end

  Cucumber::Rake::Task.new(:wip) do |t|
    t.profile = 'wip'
  end
end

task :cucumber => "cucumber:all"

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
andrewroth_activeadmin-0.3.4 tasks/test.rake
activeadmin-0.3.4 tasks/test.rake
activeadmin-0.3.3 tasks/test.rake
activeadmin-0.3.2 tasks/test.rake