Avec la version ancienne de Neo4j & tout eno4j.rb travaillait bonneRsepc - propre base de données avec Neo4j.rb 8.0.13
RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.clean_with(:truncation)
DatabaseCleaner[:neo4j, connection: { type: :server_db, path: ENV['TEST_GRAPHENEDB_URL'] }].strategy = :truncation
end
config.before(:each) do
DatabaseCleaner.strategy = :transaction
DatabaseCleaner[:neo4j, connection: { type: :server_db, path: ENV['TEST_GRAPHENEDB_URL'] }].strategy = :transaction
end
config.before(:each, js: true) do
DatabaseCleaner.strategy = :truncation
DatabaseCleaner[:neo4j, connection: { type: :server_db, path: ENV['TEST_GRAPHENEDB_URL'] }].strategy = :truncation
end
config.before(:each) do
DatabaseCleaner.start
DatabaseCleaner[:neo4j, connection: { type: :server_db, path: ENV['TEST_GRAPHENEDB_URL'] }].start
end
config.after(:each) do
DatabaseCleaner.clean
DatabaseCleaner[:neo4j, connection: { type: :server_db, path: ENV['TEST_GRAPHENEDB_URL'] }].clean
end
end
Après la mise à niveau avec une nouvelle version de Neo4j & Neo4j.rb J'ai changé cette fichier
RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.clean_with(:truncation)
end
config.before(:each) do
DatabaseCleaner.strategy = :transaction
end
config.before(:each) do
DatabaseCleaner.start
end
config.after(:each) do
DatabaseCleaner.clean
Neo4j::ActiveBase.current_session.query('MATCH (n) DETACH DELETE n')
end
end
Ceci est ma base de données fichier propre, j'utilise postgres & Neo4j dans mon projet, je l'ai fait après avoir regardé http://neo4jrb.readthedocs.io/en/8.0.x/Miscellany.html#cleaning-your-database-for-testing
Je reçois problème lorsque je lance tes t cas
Neo4j::PendingMigrationError:
Migrations are pending:
20170324201940
20170324202013
20170324202025
20170324202040
20170324202053
20170324202110
20170324202522
20170324202604
20170324202801
20170328203203