Sha256: 4a4786ab54d2832403ae6e5bb998ba61be35beadf886d820823bba9f79c18d65
Contents?: true
Size: 827 Bytes
Versions: 5
Compression:
Stored size: 827 Bytes
Contents
require File.expand_path('spec/spec_helper') require 'geoff-importer' describe Geoff::Importer do let(:db_path) { './db/test'} let(:geoff_string) { '(A) {"name": "Alice", "test_array":["value1", "value2"]}' } context 'running db' do it 'raises error if db is passed in as string' do db = Java::OrgNeo4jKernel::EmbeddedGraphDatabase.new(db_path) expect { Geoff::Importer.import(geoff_string, db_path) }.to raise_error db.shutdown end it 'inserts geoff into the db when passed with db instance' do db = Java::OrgNeo4jKernel::EmbeddedGraphDatabase.new(db_path) Geoff::Importer.import(geoff_string, db) db.shutdown end end context 'non-running db' do it 'inserts geoff into the db' do Geoff::Importer.import(geoff_string, db_path) end end end
Version data entries
5 entries across 5 versions & 1 rubygems