test/helper.rb in tracksperanto-1.4.0 vs test/helper.rb in tracksperanto-1.5.0

- old
+ new

@@ -59,16 +59,19 @@ end end def create_reference_output(exporter_klass, ref_path) File.open(ref_path, "w") do | io | - export_parabolics_with(exporter_klass.new(io)) + x = exporter_klass.new(io) + yield(x) if block_given? + export_parabolics_with(x) end end def ensure_same_output(exporter_klass, reference_path) io = StringIO.new x = exporter_klass.new(io) + yield(x) if block_given? export_parabolics_with(x) io.close assert_equal File.read(reference_path), io.string end \ No newline at end of file