test/helper.rb in processing-0.5.31 vs test/helper.rb in processing-0.5.32

- old
+ new

@@ -57,11 +57,10 @@ def get_pixels(image) %i[@image @image__] .map {image.instance_variable_get _1} .compact .first - .bitmap .pixels end def graphics(width = 10, height = 10, *args, &block) Processing::Graphics.new(width, height, *args).tap do |g| @@ -105,17 +104,17 @@ assert_equal_pixels e, a, threshold: threshold end def assert_p5_draw( *sources, default_header: DEFAULT_DRAW_HEADER, - width: 1000, height: 1000, threshold: 0.99, label: test_label) + width: 1000, height: 1000, threshold: 0.99, label: test_label, **kwargs) return unless test_with_p5? source = [default_header, *sources].compact.join("\n") path = draw_output_path "#{label}_expected", source - pd = draw_p5rb width, height, source, path, headless: true + pd = draw_p5rb width, height, source, path, **kwargs actual = test_draw source, width: width, height: height, pixelDensity: pd actual.save path.sub('_expected', '_actual') assert_equal_pixels actual.loadImage(path), actual, threshold: threshold end