File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ def end_element(name)
5656 @violations . add_violations_by_filename ( @current_filename , @current_violations )
5757 @current_filename = nil
5858 when 'violation'
59- @current_violation & .text . strip!
59+ @current_violation . text . strip!
6060 @current_violations . push ( @current_violation ) if match_filter_set? ( @current_violation )
6161 @current_violation = nil
6262 when 'error'
Original file line number Diff line number Diff line change 44
55class TestPmdReportDocument < Test ::Unit ::TestCase
66 include PmdTester
7+
8+ FIRST_FILE = '/target/repositories/spring-framework/gradle/jdiff/Null.java'
9+
710 def test_document
811 doc = PmdReportDocument . new ( 'base' , 'SHOULD_BE_REPLACED' )
912 parser = Nokogiri ::XML ::SAX ::Parser . new ( doc )
1013 parser . parse ( File . open ( 'test/resources/pmd_report_document/test_document.xml' ) )
1114 assert_equal ( 8 , doc . violations . violations_size )
12- assert_equal ( 'Document \'empty\' constructor' , doc . violations . violations [ '/target/repositories/spring-framework/gradle/jdiff/Null.java' ] [ 0 ] . text )
15+ assert_equal ( 'Document \'empty\' constructor' , doc . violations . violations [ FIRST_FILE ] [ 0 ] . text )
1316 assert_equal ( 2 , doc . errors . errors_size )
1417 pmd_errors = doc . errors . errors . values
1518 assert_not_nil ( pmd_errors [ 0 ] )
You can’t perform that action at this time.
0 commit comments