Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

adding test for TreeNode- how the fuck could this remain untested?

  • Loading branch information...
commit e7306297f7fee2b7e86585ffe49d4eea8fb643c7 1 parent 92fcda2
@apotonick authored
Showing with 19 additions and 0 deletions.
  1. +19 −0 test/tree_node_test.rb
View
19 test/tree_node_test.rb
@@ -0,0 +1,19 @@
+require 'test_helper'
+
+class TreeNodeTest < ActiveSupport::TestCase
+ context "initialization" do
+ setup do
+
+ end
+
+ should "return true for #root? without parent" do
+ assert MouseWidget.new(nil, :mum).root?
+ end
+
+ should "return false for #root? with parent" do
+ @mum = MouseWidget.new(nil, :mum)
+ assert_not MouseWidget.new(@mum, :kid).root?
+ end
+
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.