test/lib/docparser/output/yaml_output_test.rb in docparser-0.1.2 vs test/lib/docparser/output/yaml_output_test.rb in docparser-0.1.3

- old
+ new

@@ -29,23 +29,23 @@ it 'must have a header' do Dir.mktmpdir do |dir| filename = File.join(dir, 'test.yml') output = DocParser::YAMLOutput.new(filename: filename) -> do - output.add_row ['aap', 'noot', 'mies'] + output.add_row %w(aap noot mies) end.must_raise(DocParser::MissingHeaderException) end end it 'must save some rows' do Dir.mktmpdir do |dir| filename = File.join(dir, 'test.csv') output = DocParser::YAMLOutput.new(filename: filename) output.header = 'test', 'the', 'header' - output.add_row ['a', 'b', 'c'] - output.add_row ['aap', 'noot', 'mies"'] - output.add_row ['aap', 'noot'] # testing empty column + output.add_row %w(a b c) + output.add_row %w(aap noot mies") + output.add_row %w(aap noot) # testing empty column output.close open(filename).read.must_equal <<-YAMLEND --- test: a the: b @@ -66,11 +66,11 @@ Dir.mktmpdir do |dir| filename = File.join(dir, 'test.yml') output = DocParser::YAMLOutput.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 end end end \ No newline at end of file