Sha256: c7be7ae29071aab6b1827c869adfaf6a1212aa67a20f6302c1fc5b5d7026b0b4

Contents?: true

Size: 743 Bytes

Versions: 2

Compression:

Stored size: 743 Bytes

Contents

$:.push File.expand_path("../lib", __FILE__)

ENV['RAILS_ENV'] ||= 'test'

require 'ecrire'
require_relative 'test/test_task'

task default: :test

namespace :database do

  task :purge do
    [User, Post, Image, Partial, Title].each(&:delete_all)
  end

end

namespace :test do
  ['editor', 'onboarding'].each do |name|
    task = Ecrire::TestTask.new(name) do |t|
      t.theme = Dir.pwd + "/test/#{name}/theme"
      t.libs << "test"
      t.test_files = FileList["test/#{name}/**/*_test.rb"]
      t.verbose = true
    end
  end

end

task :test do
  %w(test:editor test:onboarding).each do |name|
    Rake::Task[name].invoke
  end
end

at_exit do
  unless Ecrire::Application.onboarding?
    Rake::Task['database:purge'].invoke
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ecrire-0.24.1 Rakefile
ecrire-0.24.0 Rakefile