vendredi 11 septembre 2015

How to load neo4j test database with data from fixtures/ yml file?

This is my first time developing in Ruby on Rails, and I am using Neo4j for a database. I have installed a test version, created some models representing nodes, and written a basic test to make sure everything is working. The test is very simple: it fetches all users and prints their names.

When I connect to the test database directly and execute Cypher queries to insert data, the tests find the data and react to it correctly. However, when I specify data in the test/fixtures/users.yml file, it does not load. The test finds only the data inserted manually. Here is the yml file:

one:
  name: 'Dan'
two:
  name: 'Sam'

What am I doing wrong? Is there some setting I have to enable to load yml data into neo4j?

Aucun commentaire:

Enregistrer un commentaire