Skip to content
This repository
tree: 0b25c91155
Fetching contributors…

Cannot retrieve contributors at this time

file 43 lines (36 sloc) 1.399 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 36 37 38 39 40 41 42 43
require "bundler/setup"
require "pathological"
require "rake/testtask"
require "resque/tasks"

# We use Fezzik for deployments. Fezzik requires this Rakefile, which should in turn require all deploy tasks.
if ENV["fezzik_destination"]
  require "fezzik"
  Fezzik.init(:tasks => "config/tasks")
  require "config/deploy_targets/common"
  Dir.glob("config/deploy_targets/*.rb").each { |path| require path }
  BarkeepDeploy.ensure_all_options_are_present
end

task :test => ["test:units", "test:integrations", "test:coffeescripts"]

namespace :test do
  Rake::TestTask.new(:units) do |task|
    task.libs << "test"
    task.test_files = FileList["test/unit/*"]
  end

  # TODO(caleb): Use a better name for this task.
  desc "Run the coffeescript unit tests with shoulda.js."
  task :coffeescripts do
    puts `node node_modules/jasmine-node/lib/jasmine-node/cli.js --coffee test/coffeescript`
  end

  Rake::TestTask.new(:integrations) do |task|
    task.libs << "test"
    task.test_files = FileList["test/integration/*"]
  end
end

namespace :resque do
  # The resque:work task is defined by the Resque gem. Before running it, we need to require the worker code.
  task :work => :require_resque_tasks

  # These tasks must be defined for Resque to be able to run tasks on these queues.
  task :require_resque_tasks do
    Dir.glob("resque_jobs/*.rb").each { |file_name| require file_name }
  end
end
Something went wrong with that request. Please try again.