diff --git a/spec/rails/active_record_style_relationships_spec.rb b/spec/rails/active_record_style_relationships_spec.rb index 851666aef..bd697129c 100644 --- a/spec/rails/active_record_style_relationships_spec.rb +++ b/spec/rails/active_record_style_relationships_spec.rb @@ -7,9 +7,6 @@ class ModelRelationship1 < Neo4j::Rails::Relationship end before(:each) do - Neo4j::Transaction.run do - Neo4j::Index::IndexerRegistry.delete_all_indexes - end @actor_class = create_model(Neo4j::Model) @actor_class.property :name @actor_class.property :description diff --git a/spec/rails/model_spec.rb b/spec/rails/model_spec.rb index 555adc153..d7de7d04e 100644 --- a/spec/rails/model_spec.rb +++ b/spec/rails/model_spec.rb @@ -3,12 +3,6 @@ # Specs written by Nick Sieger and modified by Andreas Ronge describe Neo4j::Model do - before(:each) do - Neo4j::Transaction.run do - Neo4j::Index::IndexerRegistry.delete_all_indexes - end - end - describe "new" do before :each do @model = Neo4j::Model.new diff --git a/spec/rails/relationship_spec.rb b/spec/rails/relationship_spec.rb index 5bdc11981..f6a3ca96b 100644 --- a/spec/rails/relationship_spec.rb +++ b/spec/rails/relationship_spec.rb @@ -620,10 +620,6 @@ def reject_posts(attributed) context "when there's lots of them" do before(:each) do - Neo4j::Transaction.run do - Neo4j::Index::IndexerRegistry.delete_all_indexes - end - subject.class.create!(:foo, @start_node, @end_node) subject.class.create!(:foo, @start_node, @end_node) subject.class.create!(:foo, @start_node, @end_node) @@ -671,9 +667,6 @@ def mark_saved describe RelationshipWithProperty do before(:each) do - Neo4j::Transaction.run do - Neo4j::Index::IndexerRegistry.delete_all_indexes - end @start_node = Neo4j::Model.new @end_node = Neo4j::Model.new end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 3d8c735ea..43ccad25a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -51,7 +51,7 @@ def new_tx RSpec.configure do |c| $name_counter = 0 - #c.filter = { :type => :problem} + c.before(:each, :type => :transactional) do new_tx end @@ -59,14 +59,14 @@ def new_tx c.after(:each, :type => :transactional) do finish_tx Neo4j::Rails::Model.close_lucene_connections - Neo4j::Transaction.run do - Neo4j::Index::IndexerRegistry.delete_all_indexes - end end c.after(:each) do finish_tx Neo4j::Rails::Model.close_lucene_connections + Neo4j::Transaction.run do + Neo4j::Index::IndexerRegistry.delete_all_indexes + end Neo4j::Transaction.run do Neo4j.threadlocal_ref_node = Neo4j::Node.new :name => "ref_#{$name_counter}" $name_counter += 1