Skip to content

Commit

Permalink
adding test for TreeNode- how the fuck could this remain untested?
Browse files Browse the repository at this point in the history
  • Loading branch information
apotonick committed Oct 10, 2011
1 parent 92fcda2 commit e730629
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions 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

0 comments on commit e730629

Please sign in to comment.