test/lib/docparser/output/html_output_test.rb in docparser-0.1.2 vs test/lib/docparser/output/html_output_test.rb in docparser-0.1.3
- old
+ new
@@ -20,20 +20,20 @@
Dir.mktmpdir do |dir|
filename = File.join(dir, 'test.html')
output = DocParser::HTMLOutput.new(filename: filename)
output.header = 'test', 'the', 'header'
output.close
- open(filename).read.must_include '<thead><tr><th>test</th><th>the</th>'\
- '<th>header</th></tr></thead>'
+ open(filename).read.must_include '<thead><tr><th>test</th><th>the</th>
+ <th>header</th></tr></thead>'.gsub(/\s+/, '')
end
end
it 'must save some rows' do
Dir.mktmpdir do |dir|
filename = File.join(dir, 'test.html')
output = DocParser::HTMLOutput.new(filename: filename)
- output.add_row ['aap', 'noot', 'mies']
+ output.add_row %w(aap noot mies)
output.add_row ['aap', 'noot', 'mies;']
output.close
html = open(filename).read
html.must_include 'tbody'
html.must_include '<tr><td>aap</td><td>noot</td><td>mies</td></tr>'
@@ -45,11 +45,11 @@
Dir.mktmpdir do |dir|
filename = File.join(dir, 'test.html')
output = DocParser::HTMLOutput.new(filename: filename)
output.header = 'test', 'the', 'header'
output.rowcount.must_equal 0
- output.add_row ['aap', 'noot', 'mies']
- output.add_row ['aap', 'noot', 'mies']
+ output.add_row %w(aap noot mies)
+ output.add_row %w(aap noot mies)
output.rowcount.must_equal 2
output.close
open(filename).read.must_include('<p>2 rows</p>')
end
end
\ No newline at end of file