Sha256: c3b5f7e8fc05f48b7dd8b4f924bbc34ceffa721a1f8a9b0c76061f4bcafa2315
Contents?: true
Size: 1.17 KB
Versions: 9
Compression:
Stored size: 1.17 KB
Contents
# frozen_string_literal: true require 'spec_helper' require 'ogr/layer' RSpec.describe OGR::Layer do include_context 'OGR::Layer, spatial_reference' describe '#spatial_filter' do context 'default' do subject { layer.spatial_filter } it { is_expected.to be_nil } end end describe '#spatial_filter= + #spatial_filter' do it 'assigns the spatial_filter to the new geometry' do geometry = OGR::Geometry.create_from_wkt('POINT (1 1)') subject.spatial_filter = geometry expect(subject.spatial_filter).to eq geometry end end describe '#set_spatial_filter_ex' do it 'does not die' do geometry = OGR::Geometry.create_from_wkt('POINT (1 1)') expect { subject.set_spatial_filter_ex(0, geometry) }.to_not raise_exception end end describe '#set_spatial_filter_rectangle' do it 'does not die' do expect { subject.set_spatial_filter_rectangle(0, 0, 1000, 1000) }. to_not raise_exception end end describe '#set_spatial_filter_rectangle_ex' do it 'does not die' do expect { subject.set_spatial_filter_rectangle_ex(0, 0, 0, 1000, 1000) }. to_not raise_exception end end end
Version data entries
9 entries across 9 versions & 1 rubygems