Skip to content

Commit

Permalink
Refactor insert_and_delete_node_spec for rspec 2.3
Browse files Browse the repository at this point in the history
  Create the @deterministic tag to aide in running focused tests.
  (44 examples, 0 failures) (Run filtered using {:deterministic=>true})
  • Loading branch information
hipe committed Dec 15, 2010
1 parent eacbdbe commit e076b34
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions spec/runtime/interval_skip_list/insert_and_delete_node_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

describe IntervalSkipList do
attr_reader :list

before do
@list = IntervalSkipList.new
end
Expand Down Expand Up @@ -55,14 +55,14 @@
end
end

describe " when 1 has been inserted" do
describe " when 1 has been inserted", :deterministic => true do
attr_reader :inserted_node, :inserted_nodes

def expected_node_heights
[1]
end

it_should_behave_like "#next_node_height is deterministic"
include NextNodeHeightIsDeterministicSharedContext

before do
@inserted_node = list.insert_node(1)
Expand Down Expand Up @@ -115,14 +115,14 @@ def expected_node_heights
end
end

describe " when 1 and 3 have been inserted in order" do
describe " when 1 and 3 have been inserted in order", :deterministic => true do
attr_reader :inserted_nodes

def expected_node_heights
[1, 2]
end

it_should_behave_like "#next_node_height is deterministic"
include NextNodeHeightIsDeterministicSharedContext

before do
@inserted_nodes = []
Expand Down Expand Up @@ -212,14 +212,14 @@ def expected_node_heights
end
end

describe " when 1, 3 and 7 have been inserted in order" do
describe " when 1, 3 and 7 have been inserted in order", :deterministic => true do
attr_reader :inserted_nodes

def expected_node_heights
[1, 2, 1]
end

it_should_behave_like "#next_node_height is deterministic"
include NextNodeHeightIsDeterministicSharedContext

before do
@inserted_nodes = []
Expand Down Expand Up @@ -309,14 +309,14 @@ def expected_node_heights
end
end

describe " when 7, 1 and 3 have been inserted in order" do
describe " when 7, 1 and 3 have been inserted in order", :deterministic => true do
attr_reader :inserted_nodes

def expected_node_heights
[1, 1, 2]
end

it_should_behave_like "#next_node_height is deterministic"
include NextNodeHeightIsDeterministicSharedContext

before do
@inserted_nodes = []
Expand Down

0 comments on commit e076b34

Please sign in to comment.