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