diff --git a/test/neo4j/transaction_spec.rb b/test/neo4j/transaction_spec.rb index 8d220e6de..900806d0a 100644 --- a/test/neo4j/transaction_spec.rb +++ b/test/neo4j/transaction_spec.rb @@ -7,7 +7,6 @@ class BaseNode include Neo4j::NodeMixin - include Neo4j::DynamicAccessorMixin end @@ -40,33 +39,33 @@ class BaseNode end it "should not change properties" do - node = Neo4j::Transaction.run { b = BaseNode.new; b.foo = 'foo'; b } + node = Neo4j::Transaction.run { b = BaseNode.new; b[:foo] = 'foo'; b } # when doing a rollback Neo4j::Transaction.run { |t| - node.foo = "changed" - node.foo.should == "changed" + node[:foo] = "changed" + node[:foo].should == "changed" t.failure } # then - Neo4j::Transaction.run { node.foo.should == 'foo' } + Neo4j::Transaction.run { node[:foo].should == 'foo' } end it "should rollback a transaction when an exception is thrown" do - node = Neo4j::Transaction.run { b = BaseNode.new; b.foo = 'foo'; b } + node = Neo4j::Transaction.run { b = BaseNode.new; b[:foo] = 'foo'; b } # when doing a rollback lambda do Neo4j::Transaction.run { |t| - node.foo = "changed" - node.foo.should == "changed" + node[:foo] = "changed" + node[:foo].should == "changed" raise "BOOOM" } end.should raise_error # then - Neo4j::Transaction.run { node.foo.should == 'foo' } + Neo4j::Transaction.run { node[:foo].should == 'foo' } end @@ -90,7 +89,7 @@ class BaseNode node = nil Neo4j::Transaction.run { node = BaseNode.new - node.baaz = "hello" + node[:baaz] = "hello" } Neo4j.stop @@ -98,7 +97,7 @@ class BaseNode Neo4j::Transaction.run { node2 = Neo4j.instance.find_node(node.neo_node_id) - node2.baaz.should == "hello" + node2[:baaz].should == "hello" } end end