Sha256: 4f146ed15a2fbc65b847ea623a15da3f76c9d31c73a54e48db030fca204d9874
Contents?: true
Size: 670 Bytes
Versions: 20
Compression:
Stored size: 670 Bytes
Contents
require 'test_helper' require 'nokogiri' class Mathematical::MathJaxTest < MiniTest::Test render_svg = Mathematical.new SKIPPED = [] Dir["#{MATHJAX_TEX_DIR}/**/*.txt"].each do |tex| define_method "test_#{tex}" do tex_contents = File.read(tex) data = nil assert_silent do data = render_svg.render(tex_contents) end write_sample(tex_contents, File.basename(tex, '.txt')) if ENV['MATHEMATICAL_GENERATE_SAMPLE'] # assert the SVG actually rendered doc = Nokogiri::HTML(data[:data]) assert_empty doc.search(%(//svg[@width='0pt'])) assert_empty doc.search(%(//svg[@height='0pt'])) end end end
Version data entries
20 entries across 20 versions & 1 rubygems