Sha256: 3356fbbf4d93054f5e6803442478a9f2cbf02f36569803cfedb4f16373d562b6

Contents?: true

Size: 676 Bytes

Versions: 20

Compression:

Stored size: 676 Bytes

Contents

require "bundler/gem_tasks"
require 'rake/testtask'
require 'evertils/test'

Rake::TestTask.new do |t|
  t.libs << 'test'
end

task :seed do
  if ENV['TEST'].nil?
    Evertils::Test::Base.before
  end
end

task :cleanup do
  if ENV['TEST'].nil?
    Evertils::Test::Base.after
  end
end


# hack from
# http://stackoverflow.com/questions/1689504/how-do-i-make-a-rake-task-run-after-all-other-tasks-i-e-a-rake-afterbuild-tas
current_tasks =  Rake.application.top_level_tasks
if current_tasks.include?('test')
  current_tasks << :cleanup
  Rake.application.instance_variable_set(:@top_level_tasks, current_tasks)
  task :test => :seed
end

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

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
evertils-common-0.3.18 Rakefile
evertils-common-0.3.17 Rakefile
evertils-common-0.3.16 Rakefile
evertils-common-0.3.15 Rakefile
evertils-common-0.3.14 Rakefile
evertils-common-0.3.13 Rakefile
evertils-common-0.3.12 Rakefile
evertils-common-0.3.11 Rakefile
evertils-common-0.3.10 Rakefile
evertils-common-0.3.9 Rakefile
evertils-common-0.3.8 Rakefile
evertils-common-0.3.7 Rakefile
evertils-common-0.3.6 Rakefile
evertils-common-0.3.5 Rakefile
evertils-common-0.3.4.1 Rakefile
evertils-common-0.3.4 Rakefile
evertils-common-0.3.4.1.pre.dev Rakefile
evertils-common-0.3.3.1 Rakefile
evertils-common-0.3.3 Rakefile
evertils-common-0.3.2 Rakefile