Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 35 lines (29 sloc) 1.067 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
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

desc "Prepares the fixtures for being tested by installing dependencies"
task "test:setup" do
  Dir[File.dirname(__FILE__) + "/fixtures/{padrino_test,sinatra_test,rails2,rails3}"].each do |fixture|
    puts "\n*** Setting up for #{File.basename(fixture)} tests ***\n"
    `export BUNDLE_GEMFILE=#{fixture}/Gemfile` if ENV['TRAVIS']
    puts `cd #{fixture}; bundle install;`
  end
end

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

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

desc "Run tests for rabl"
task :default => :test
Something went wrong with that request. Please try again.