Skip to content

Commit

Permalink
edges & neighbors specs should use new syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepycat committed Mar 17, 2015
1 parent 919d7d9 commit 9c267c1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
16 changes: 7 additions & 9 deletions spec/components/edges_spec.rb
Expand Up @@ -4,22 +4,20 @@ module Graphiti

RSpec.describe Edges do

before(:each) do
let :foo do
{foo: "bar"}.insert.into :nodes
{fizz: "buzz"}.insert.into :nodes
{_to: foo["_id"], _from: fizz["_id"]}.insert.into :edges
end

after(:each) do
clean_out_db
let :fizz do
{fizz: "buzz"}.insert.into :nodes
end

let(:foo) do
{foo: "bar"}.vertices.first
before(:each) do
{_to: foo["_id"], _from: fizz["_id"] }.insert.into :edges
end

let(:fizz) do
{fizz: "buzz"}.vertices.first
after(:each) do
clean_out_db
end

let(:edges){ Edges.new(List.new(foo: "bar")) }
Expand Down
10 changes: 7 additions & 3 deletions spec/components/neighbors_spec.rb
Expand Up @@ -6,11 +6,15 @@ module Graphiti

RSpec.describe Neighbors do

before(:each) do
let :foo do
{foo: "bar"}.insert.into :nodes
foo = {foo: "bar"}.vertices.first
end

let :fizz do
{fizz: "buzz"}.insert.into :nodes
fizz = {fizz: "buzz"}.vertices.first
end

before(:each) do
{_to: foo["_id"], _from: fizz["_id"]}.insert.into :edges
end

Expand Down

0 comments on commit 9c267c1

Please sign in to comment.