File: Rakefile

package info (click to toggle)
ruby-sassc-rails 2.1.2-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 428 kB
  • sloc: ruby: 628; makefile: 4
file content (33 lines) | stat: -rw-r--r-- 736 bytes parent folder | download | duplicates (2)
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
require "bundler/gem_tasks"

task :test do
  $LOAD_PATH.unshift('lib', 'test')
  Dir.glob('./test/**/*_test.rb') { |f| require f }
end
task :default => [:test]

namespace :tests do
  gemfiles = %w[
    sprockets-rails_3_0
    sprockets-rails_2_3
    sprockets_3_0
    sprockets_4_0
    rails_4_2
    rails_5_2
  ]

  gemfiles.each do |gemfile|
    desc "Run tests against #{gemfile}"
    task gemfile do
      sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle install"
      sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle exec rake test"
    end
  end

  desc "Run tests against all common asset pipeline setups"
  task :all do
    gemfiles.each do |gemfile|
      Rake::Task["tests:#{gemfile}"].invoke
    end
  end
end