spec/useless/doc/ui/godel_spec.rb in useless-doc-0.6.5 vs spec/useless/doc/ui/godel_spec.rb in useless-doc-0.7.0
- old
+ new
@@ -186,13 +186,25 @@
end
it 'should add body information to a table' do
[
{ key: 'name', description: 'The name of the twonk.' },
- { key: 'created_by', description: 'The short name of the user who created the twonk.' },
+ { key: 'created_by', description: 'The user who created this twonk.' },
{ key: 'hoinked_by', description: 'The ID of the person who hoinked this twonk.' }
].each do |attribute|
@doc.css('table').find do |table|
+ table.content.match(attribute[:key]) and
+ table.content.match(attribute[:description])
+ end.should_not be_nil
+ end
+ end
+
+ it 'should add body sub-attributes to a special table row' do
+ [
+ { key: 'id', description: 'The unique ID of the user.' },
+ { key: 'short_name', description: 'A user-friendly handle for the user.' },
+ ].each do |attribute|
+ @doc.css('table tr.sub-attribute').find do |table|
table.content.match(attribute[:key]) and
table.content.match(attribute[:description])
end.should_not be_nil
end
end