Sha256: 5d6af162b80fbdfc360505f383b51b7131b9adf27d318775b3ef82b2f252929b

Contents?: true

Size: 677 Bytes

Versions: 3

Compression:

Stored size: 677 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'
require 'fileutils'

RSpec.describe Assembly::Image do
  let(:assembly_image) { described_class.new(input_path) }
  let(:input_path) { TEST_TIF_INPUT_FILE }

  before { cleanup }

  describe '#jp2_filename' do
    it 'indicates the default jp2 filename' do
      expect(assembly_image.jp2_filename).to eq input_path.gsub('.tif', '.jp2')
    end

    context 'with a file with no extension' do
      let(:input_path) { '/path/to/a/file_with_no_extension' }

      it 'indicates the default jp2 filename' do
        expect(assembly_image.jp2_filename).to eq '/path/to/a/file_with_no_extension.jp2'
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
assembly-image-2.1.2 spec/assembly/image_spec.rb
assembly-image-2.1.1 spec/assembly/image_spec.rb
assembly-image-2.1.0 spec/assembly/image_spec.rb