Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding test for TreeNode- how the fuck could this remain untested?
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -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 |