Skip to content

Instantly share code, notes, and snippets.

@nomasprime
Created September 23, 2015 10:11
Show Gist options
  • Save nomasprime/be8b8981900e8746c751 to your computer and use it in GitHub Desktop.
Save nomasprime/be8b8981900e8746c751 to your computer and use it in GitHub Desktop.
require 'spec_helper'
module AdminBounds
describe Osmosis do
context 'when pbf file does not exist' do
subject(:osmosis) { Osmosis.new('no.osm.pbf') }
it 'raises runtime error' do
expect { osmosis.import_administrative_boundaries }.to raise_error(RuntimeError)
end
end
context 'when pbf file is bad' do
subject(:osmosis) { Osmosis.new(File.dirname(__FILE__) + '/../fixtures/files/andorra-latest-bad.osm.pbf')}
it 'raises runtime error' do
expect { osmosis.import_administrative_boundaries }.to raise_error(RuntimeError)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment