Sha256: c29fa6a029ea2689ef21cb03e79e77dc9d40a98b4c952c3019b9d0a272cbc4e5

Contents?: true

Size: 735 Bytes

Versions: 30

Compression:

Stored size: 735 Bytes

Contents

require 'spec_helper'

module Ddr
  module Derivatives
    RSpec.describe PngGenerator do

      describe "generate" do
        let(:tempdir) { Dir.mktmpdir }
        let(:output_file) { File.new(File.join(tempdir, "output.png"), 'wb') }
        let(:options) { "-resize '100x100>'" }
        let(:generator) { described_class.new(source, output_file.path, options) }
        after { FileUtils.rmdir(tempdir) }
        context "tiff source" do
          let(:source) { File.join(Ddr::Models::Engine.root, "spec", "fixtures", "imageA.tif") }
          it "should generate a non-empty file" do
            generator.generate
            expect(File.size(output_file.path)).to be > 0
          end
        end
      end

    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
ddr-models-2.3.2 spec/derivatives/png_generator_spec.rb
ddr-models-2.3.1 spec/derivatives/png_generator_spec.rb
ddr-models-2.3.0 spec/derivatives/png_generator_spec.rb
ddr-models-2.2.0 spec/derivatives/png_generator_spec.rb
ddr-models-2.1.3 spec/derivatives/png_generator_spec.rb
ddr-models-2.1.2 spec/derivatives/png_generator_spec.rb
ddr-models-2.1.1 spec/derivatives/png_generator_spec.rb
ddr-models-2.1.0 spec/derivatives/png_generator_spec.rb
ddr-models-2.1.0.rc2 spec/derivatives/png_generator_spec.rb
ddr-models-2.1.0.rc1 spec/derivatives/png_generator_spec.rb
ddr-models-2.0.1 spec/derivatives/png_generator_spec.rb
ddr-models-2.0.0 spec/derivatives/png_generator_spec.rb
ddr-models-2.0.0.rc6 spec/derivatives/png_generator_spec.rb
ddr-models-2.0.0.rc5 spec/derivatives/png_generator_spec.rb
ddr-models-2.0.0.rc4 spec/derivatives/png_generator_spec.rb
ddr-models-2.0.0.rc3 spec/derivatives/png_generator_spec.rb
ddr-models-2.0.0.rc2 spec/derivatives/png_generator_spec.rb
ddr-models-1.17.1 spec/derivatives/png_generator_spec.rb
ddr-models-2.0.0.rc1 spec/derivatives/png_generator_spec.rb
ddr-models-2.0.0.pre.5 spec/derivatives/png_generator_spec.rb