Skip to content

Commit

Permalink
Revert "Don't isolate tests as possible"
Browse files Browse the repository at this point in the history
This reverts commit 40387a4.

Reason: some tests fail on Rails 5.1
  • Loading branch information
amatsuda committed Apr 27, 2017
1 parent 80d0b92 commit 66271a1
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 66271a1

Please sign in to comment.