Sha256: 6597a74740cb53d394aee5ae98fbbeac48f2702f2042f6b5a6c36fcbaab1fe0d
Contents?: true
Size: 960 Bytes
Versions: 18
Compression:
Stored size: 960 Bytes
Contents
require 'spec_helper' describe GeoConcerns::Processors::Vector::Processor do subject { described_class.new(file_name, directives) } let(:processor) { double } context 'when a shapefile format type is passed' do let(:file_name) { 'files/shapefile.zip' } let(:directives) { { input_format: 'application/zip; ogr-format="ESRI Shapefile"' } } it 'calls the shapefile processor' do expect(GeoConcerns::Processors::Vector::Shapefile).to receive(:new).and_return(processor) expect(processor).to receive(:process) subject.process end end context 'when a geojson format type is passed' do let(:file_name) { 'files/geo.json' } let(:directives) { { input_format: 'application/vnd.geo+json' } } it 'calls the base vector processor' do expect(GeoConcerns::Processors::Vector::Base).to receive(:new).and_return(processor) expect(processor).to receive(:process) subject.process end end end
Version data entries
18 entries across 18 versions & 1 rubygems