Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 20 lines (16 sloc) 0.651 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#!/usr/bin/env rake

require "bundler/gem_tasks"
require "rspec/core/rake_task"

RSpec::Core::RakeTask.new :spec

desc 'Build and copy Mocha and Chai assets from submodules into vendor/assets'
task :assets do
  sh 'git submodule update --init' unless File.exist?('mocha/Makefile') || File.exist?('chai/Makefile')
  sh 'cd mocha && make clean && make'
  sh 'cd chai && make clean && make'
  mkdir_p 'vendor/assets/javascripts'
  mkdir_p 'vendor/assets/stylesheets'
  cp 'mocha/mocha.js', 'vendor/assets/javascripts/'
  cp 'mocha/mocha.css', 'vendor/assets/stylesheets/'
  cp 'chai/chai.js', 'vendor/assets/javascripts/'
end

task :default => :spec
Something went wrong with that request. Please try again.