-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It works the same but you need to create a tree first, then a node in that tree. The node can then be inserted into a document.
- Loading branch information
1 parent
49cfcef
commit ea3a12a
Showing
4 changed files
with
31 additions
and
28 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
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
require "./spec_helper" | ||
|
||
describe Myhtml::Tree do | ||
describe "#create_node" do | ||
it "returns a new Myhtml::Node" do | ||
tree = Myhtml::Tree.new | ||
|
||
node = tree.create_node(:a) | ||
|
||
node.should be_a(Myhtml::Node) | ||
node.tag_id.should eq(Myhtml::Lib::MyhtmlTags::MyHTML_TAG_A) | ||
end | ||
end | ||
end |
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
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