spec/unit/gdal/dataset_spec.rb in ffi-gdal-1.0.0.beta3 vs spec/unit/gdal/dataset_spec.rb in ffi-gdal-1.0.0.beta4
- old
+ new
@@ -1,8 +1,9 @@
require 'spec_helper'
+require 'gdal/dataset'
-describe GDAL::Dataset do
+RSpec.describe GDAL::Dataset do
let(:file_path) do
File.expand_path('../../support/images/osgeo/geotiff/GeogToWGS84GeoKey/GeogToWGS84GeoKey5.tif', __dir__)
end
subject do
@@ -57,15 +58,11 @@
expect(subject.raster_band(1)).to be_a GDAL::RasterBand
end
end
describe '#add_band' do
- it 'raises a GDAL::CPLErrFailure' do
- skip 'Figure out why this causes a segfault'
-
- expect {
- subject.add_band(:GDT_Byte)
- }.to raise_exception(GDAL::CPLErrFailure)
+ it 'raises a GDAL::UnsupportedOperation' do
+ expect { subject.add_band(:GDT_Byte) }.to raise_exception(GDAL::UnsupportedOperation)
end
end
describe '#create_mask_band' do
context 'no flags given' do