test/lib/docparser/document_test.rb in docparser-0.1.4 vs test/lib/docparser/document_test.rb in docparser-0.1.6
- old
+ new
@@ -2,12 +2,12 @@
describe DocParser::Document do
before do
Log4r::Logger['docparser'].level = Log4r::INFO
$output = DocParser::NilOutput.new
@parser = Class.new do
- define_method(:outputs) { [$output] }
- end.new
+ define_method(:outputs) { [$output] }
+ end.new
@test_doc_path = File.join($SUPPORT_DIR, 'test_html.html')
@test_doc = DocParser::Document.new(filename: @test_doc_path,
parser: @parser)
end
@@ -113,14 +113,14 @@
@test_doc.results.must_equal [[%w(test), %w(test test2)]]
end
it 'should be possible to not use outputs' do
parser = Class.new do
- define_method(:outputs) { [] }
- end.new
+ define_method(:outputs) { [] }
+ end.new
test_doc = DocParser::Document.new(filename: @test_doc_path,
- parser: parser)
+ parser: parser)
test_doc.html.must_include('Test HTML')
end
it 'should be possible to specify outputs directly' do
@test_doc.add_row ['test!'], output: $output
@@ -129,15 +129,15 @@
it 'should be possible to use multiple outputs' do
output = DocParser::NilOutput.new
output2 = DocParser::NilOutput.new
parser = Class.new do
- define_method(:outputs) { [output, output2] }
- end.new
+ define_method(:outputs) { [output, output2] }
+ end.new
test_doc = DocParser::Document.new(filename: @test_doc_path,
- parser: parser)
+ parser: parser)
test_doc.add_row ['a'], output: 1
test_doc.add_row ['b'], output: 0
test_doc.results.must_equal [[['b']], [['a']]]
end
-end
\ No newline at end of file
+end