spec/spec_helper.rb in todo_next-0.0.1 vs spec/spec_helper.rb in todo_next-0.0.2
- old
+ new
@@ -23,29 +23,34 @@
{
:children => children.collect{|ch| ch.to_hash }
}
end
- class OL
+ class EX
+ def to_hash
+ { :type => :ex, :text => text,
+ :children => children.collect{|ch| ch.to_hash }
+ }
+ end
+ end
+ class OL
def to_hash
- { :type => :ol,
- :text => text,
+ { :type => :ol, :text => text,
:children => children.collect{|ch| ch.to_hash }
}
end
end
+
class LI
def to_hash
- { :type => :li,
- :text => text
- }
+ { :type => :li, :text => text}
end
end
end
def parsed_result(source)
- TodoNext::Parser.parse(source).to_hash[:children]
+ TodoNext::Parser.parse(source, prune_example_nodes=false).to_hash[:children]
end
def result_should_be(expected)
parsed_result(@source).should == expected
end