Sha256: 9ef5178234db111dc4da4b7e137ca3aced734276e9573f72a93985b057e4167c
Contents?: true
Size: 1.04 KB
Versions: 39
Compression:
Stored size: 1.04 KB
Contents
require 'spec_helper' module Ddr::Derivatives RSpec.describe PtifGenerator do describe "generate" do let(:tempdir) { Dir.mktmpdir } let(:output_path) { File.join(tempdir, "output.ptif") } let(:options) { "jpeg:90,tile:256x256,pyramid" } let(:generator) { described_class.new(options) } after { FileUtils.rmdir(tempdir) } context "tiff source" do context "8-bit source" do let(:source_path) { File.join(Ddr::Models::Engine.root, "spec", "fixtures", "8bit.tif") } it "should generate a non-empty file" do generator.generate(source_path, output_path) expect(File.size(output_path)).to be > 0 end end context "16-bit source" do let(:source_path) { File.join(Ddr::Models::Engine.root, "spec", "fixtures", "16bit.tif") } it "should generate a non-empty file" do generator.generate(source_path, output_path) expect(File.size(output_path)).to be > 0 end end end end end end
Version data entries
39 entries across 39 versions & 1 rubygems