mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Revert "Revert "Don't isolate tests as possible""
This reverts commit 66271a1d35
.
This commit is contained in:
parent
a1977c8c81
commit
19743dddc9
1 changed files with 12 additions and 6 deletions
18
Rakefile
18
Rakefile
|
@ -4,13 +4,19 @@ require "bundler/gem_tasks"
|
||||||
|
|
||||||
task :default => :test
|
task :default => :test
|
||||||
|
|
||||||
#FIXME: Redefining :test task to run each test in isolated process.
|
# FIXME: Redefining :test task to run test/options_test.rb in isolated process since it depends on whether Rails is loaded or not.
|
||||||
# Remove this task when we finished changing escape_html option to be true by default.
|
# Remove this task when we finished changing escape_html option to be true by default.
|
||||||
task :test do
|
isolated_test = Rake::TestTask.new do |t|
|
||||||
test_files = Dir.glob('test/**/*_test.rb').reject { |f| f.start_with?('test/gemfiles/vendor/bundle') }
|
t.libs << 'test'
|
||||||
test_files.all? do |file|
|
t.test_files = %w[test/options_test.rb]
|
||||||
sh(Gem.ruby, '-w', '-I/lib', '-Itest', file)
|
t.warning = true
|
||||||
end || raise('Failures')
|
t.verbose = true
|
||||||
|
end
|
||||||
|
Rake::TestTask.new do |t|
|
||||||
|
t.libs << 'test'
|
||||||
|
t.test_files = Dir['test/*_test.rb'] + Dir['test/haml-spec/*_test.rb'] - isolated_test.file_list
|
||||||
|
t.warning = true
|
||||||
|
t.verbose = true
|
||||||
end
|
end
|
||||||
|
|
||||||
CLEAN.replace %w(pkg doc coverage .yardoc test/haml vendor)
|
CLEAN.replace %w(pkg doc coverage .yardoc test/haml vendor)
|
||||||
|
|
Loading…
Add table
Reference in a new issue