Sha256: c42fa2556a57e1e48ba2a1d854006aeb2e2bdfe451c5f5ffbe00a7aacd4f5902

Contents?: true

Size: 461 Bytes

Versions: 6

Compression:

Stored size: 461 Bytes

Contents

require 'spec_helper'

describe Cadet do

  it "should create a node, (and also test that transaction works in the process)" do
    db = Cadet::Session.open("./tmp")
    db.transaction do
      n = db.create_node
    end
    db.close
  end

  it "should _not_ create a node, as we are not in a transaction" do
    db = Cadet::Session.open("./tmp")
    expect { db.create_node }.to raise_error(org.neo4j.graphdb.NotInTransactionException)
    db.close
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cadet-0.0.6-java spec/unit/cadet_spec.rb
cadet-0.0.5-java spec/unit/cadet_spec.rb
cadet-0.0.4-java spec/unit/cadet_spec.rb
cadet-0.0.3-java spec/unit/cadet_spec.rb
cadet-0.0.2-java spec/unit/cadet_spec.rb
cadet-0.0.1-java spec/unit/cadet_spec.rb