Sha256: 7885bbf8ad8392aea9fc568eeeb92c6f15829755e3104df7cb383646b9e6f9b4

Contents?: true

Size: 893 Bytes

Versions: 6

Compression:

Stored size: 893 Bytes

Contents

require 'spec_helper'

describe GeoWorks::Processors::Raster::Dem do
  let(:output_file) { 'output/geo.png' }
  let(:file_name) { 'files/geo.dem' }
  let(:options) { { output_size: '150 150', label: :thumbnail }
  }

  subject { described_class.new(file_name, {}) }

  describe '#encode_queue' do
    it 'returns an array of command name symbols' do
      expect(subject.class.encode_queue).to include :hillshade
    end
  end

  describe '#reproject_queue' do
    it 'returns an array of command name symbols' do
      expect(subject.class.reproject_queue).to include :hillshade
    end
  end

  describe '#hillshade' do
    it 'executes a gdal hillshade command' do
      command = "gdaldem hillshade -q -of GTiff \"files/geo.dem\" output/geo.png"
      expect(subject.class).to receive(:execute).with command
      subject.class.hillshade(file_name, output_file, options)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
geo_works-0.2.0 spec/processors/geo_works/processors/raster/dem_spec.rb
geo_works-0.1.4 spec/processors/geo_works/processors/raster/dem_spec.rb
geo_works-0.1.3 spec/processors/geo_works/processors/raster/dem_spec.rb
geo_works-0.1.2 spec/processors/geo_works/processors/raster/dem_spec.rb
geo_works-0.1.1 spec/processors/geo_works/processors/raster/dem_spec.rb
geo_works-0.1.0 spec/processors/geo_works/processors/raster/dem_spec.rb