Sha256: e5802e83b5cb9e38b0cc301a72a8fd88834d4564aed567fa7582c443dc08f03a

Contents?: true

Size: 1.59 KB

Versions: 26

Compression:

Stored size: 1.59 KB

Contents

include Rake::DSL

require 'bundler'
Bundler::GemHelper.install_tasks

require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
  test.libs << 'lib' << 'test'
  test.pattern = 'test/*_test.rb'
  test.warning = true
  test.verbose = true
  test.ruby_opts = ['-rubygems']
end

# Running integration tests
# rake test:clean
# rake test:setup
# rake test:full

fixture_list = "{padrino_test,sinatra_test,rails2,rails3,rails3_2,rails4}"

desc "Clean up the fixtures being tested by cleaning and installing dependencies"
task "test:clean" do
  Dir[File.dirname(__FILE__) + "/fixtures/#{fixture_list}"].each do |fixture|
    puts "\n*** Cleaning up for #{File.basename(fixture)} tests ***\n"
    Dir.chdir(fixture) { puts `rm Gemfile.lock` }
  end
end

desc "Prepares the fixtures being tested by installing dependencies"
task "test:setup" do
  Dir[File.dirname(__FILE__) + "/fixtures/#{fixture_list}"].each do |fixture|
    puts "\n*** Setting up for #{File.basename(fixture)} tests ***\n"
    `export BUNDLE_GEMFILE="#{fixture}/Gemfile"` if ENV["TRAVIS"]
    Bundler.with_clean_env {
      Dir.chdir(fixture) { puts `mkdir -p tmp/cache; bundle install --gemfile="#{fixture}/Gemfile"`; }
    }
  end
end

desc "Executes the fixture tests"
task "test:fixtures" do
  Dir[File.dirname(__FILE__) + "/fixtures/#{fixture_list}"].each do |fixture|
    puts "\n*** Running tests for #{File.basename(fixture)}... ***\n"
    Bundler.with_clean_env {
      Dir.chdir(fixture) { puts `bundle check; bundle exec rake test:rabl` }
    }
  end
end

task "test:full" => [:test, "test:fixtures"]

desc "Run tests for rabl"
task :default => :test

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
rabl-0.13.0 Rakefile
rabl-0.12.0 Rakefile
rabl-0.11.8 Rakefile
rabl-0.11.7 Rakefile
solidus_backend-1.0.0.pre3 vendor/bundle/gems/rabl-0.11.6/Rakefile
solidus_backend-1.0.0.pre2 vendor/bundle/gems/rabl-0.11.6/Rakefile
solidus_backend-1.0.0.pre vendor/bundle/gems/rabl-0.11.6/Rakefile
rabl-0.11.6 Rakefile
rabl-0.11.5 Rakefile
rabl-0.11.4 Rakefile
rabl-0.11.3 Rakefile
rabl-0.11.2 Rakefile
rabl-0.11.1 Rakefile
rabl-0.11.0 Rakefile
rabl-0.10.1 Rakefile
rabl-0.10.0 Rakefile
rabl-0.9.4.pre1 Rakefile
rabl-0.9.3 Rakefile
rabl-0.9.3.pre1 Rakefile
rabl-0.9.2 Rakefile