Sha256: 4d429a2af0e954a3b63a46458d711cb7dba261fe941bcfcc5a24df4c31324bb0

Contents?: true

Size: 1.45 KB

Versions: 22

Compression:

Stored size: 1.45 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:stup
# rake test:full

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

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"
    puts `cd #{fixture}; 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']
    puts `cd #{fixture}; mkdir -p tmp/cache; bundle install;`
  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"
    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

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
rabl-0.8.1 Rakefile
rabl-0.8.0 Rakefile
rabl-0.7.10 Rakefile
rabl-0.7.9 Rakefile
rabl-0.7.8 Rakefile
rabl-0.7.7 Rakefile
rabl-0.7.6 Rakefile
rabl-0.7.5 Rakefile
rabl-0.7.4 Rakefile
rabl-0.7.3 Rakefile
rabl-0.7.2 Rakefile
rabl-0.7.1 Rakefile
rabl-0.7.0 Rakefile
rabl-0.6.14 Rakefile
rabl-0.6.13 Rakefile
rabl-0.6.12 Rakefile
rabl-0.6.11 Rakefile
rabl-0.6.10 Rakefile
rabl-0.6.9 Rakefile
rabl-0.6.8 Rakefile