Commit cf54159b authored by KitaitiMakoto's avatar KitaitiMakoto

Don't use env var to switch XML backend in test

parent fd38a45c
......@@ -39,21 +39,11 @@ namespace :test do
File.rename "#{input_dir}.epub.tmp", "#{input_dir}.epub"
end
# TODO: Test with both REXML and Nokogiri in testing framework
%w[REXML Nokogiri].each do |xml_backend|
task "set_xml_backend_#{xml_backend.downcase}" do
ENV["EPUB_PARSER_XML_BACKEND"] = xml_backend
end
Rake::TestTask.new "test_with_#{xml_backend.downcase}" do |task|
task.test_files = FileList['test/**/test_*.rb']
task.warning = true
task.options = '--no-show-detail-immediately --verbose'
EPUB::Parser::XMLDocument.backend = xml_backend
end
task "test_with_#{xml_backend.downcase}" => "set_xml_backend_#{xml_backend.downcase}"
Rake::TestTask.new do |task|
task.test_files = FileList['test/**/test_*.rb']
task.warning = true
task.options = '--no-show-detail-immediately --verbose'
end
task :test => [:test_with_rexml, :test_with_nokogiri]
end
task :doc => 'doc:default'
......
......@@ -15,4 +15,3 @@ if ENV["PRETTY_BACKTRACE"]
end
require 'epub/parser'
EPUB::Parser::XMLDocument.backend = ENV["EPUB_PARSER_XML_BACKEND"].to_sym
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment