Permalink
Browse files

fixing failing specs due to nodes misordering

  • Loading branch information...
1 parent cd90c67 commit 46fcfccf25aa975cc19ec9735f255d6240dc43cf @chikamichi committed Jul 10, 2011
Showing with 7 additions and 7 deletions.
  1. +1 −1 lib/jumoku/version.rb
  2. +6 −6 spec/behaviors/core_tree.rb
View
@@ -1,6 +1,6 @@
module Jumoku
MAJOR = 0
MINOR = 2
- PATCH = 0
+ PATCH = 2
VERSION = [MAJOR, MINOR, PATCH].join('.')
end
@@ -56,9 +56,9 @@
describe "#add_branch!" do
describe "an empty tree" do
it "should create a branch and return the updated tree" do
- tree.add_branch!(:one, :two).should be_a tree_type
+ tree.add_branch!(1, 2).should be_a tree_type
tree.should be_valid
- tree.nodes.should == [:one, :two]
+ tree.nodes.sort.should == [1, 2]
end
end
@@ -213,12 +213,12 @@
describe "a tree containing several nodes" do
it "should be aware of its nodes" do
- tree.add_node! :solo
- tree.nodes.should == [:solo]
+ tree.add_node! 1
+ tree.nodes.sort.should == [1]
- tree.add_branch! 2, :solo
+ tree.add_branch! 2, 1
tree.add_branch! 2, 3
- tree.nodes.should == [:solo, 2, 3]
+ tree.nodes.sort.should == [1, 2, 3]
tree.should be_valid
end
end

0 comments on commit 46fcfcc

Please sign in to comment.