Skip to content

Instantly share code, notes, and snippets.

@krasio
Created January 27, 2011 09:49
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krasio/798307 to your computer and use it in GitHub Desktop.
Save krasio/798307 to your computer and use it in GitHub Desktop.
# features/support/configuration.rb
Before do
Neo4j::Transaction.run do
Neo4j._all_nodes.each { |n| n.del unless n.neo_id == 0 }
end
end
# spec/support/configuration.rb
def delete_all
Neo4j::Transaction.run do
Neo4j._all_nodes.each { |n| n.del unless n.neo_id == 0 }
end
end
RSpec.configure do |c|
c.before(:each) do
delete_all
end
c.after(:all) do
delete_all
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment