Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
kostyaplis committed Apr 1, 2020
1 parent ae03a6b commit 08b456f
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions Dangerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,23 @@ def parse_files(*files)
failed_tests += failed_suites.map(&:nodes).flatten.select { |node| node.kind_of?(Ox::Element) && node.value == 'testcase' }
end

@failures = failed_tests.select do |test|
@failures = failed_tests.select do |test|
test.nodes.count > 0
end.select do |test|
node = test.nodes.first
node.kind_of?(Ox::Element) && node.value == 'failure'
end

@errors = failed_tests.select do |test|
@errors = failed_tests.select do |test|
test.nodes.count > 0
end.select do |test|
end.select do |test|
node = test.nodes.first
node.kind_of?(Ox::Element) && node.value == 'error'
end

@skipped = @tests.select do |test|
@skipped = @tests.select do |test|
test.nodes.count > 0
end.select do |test|
end.select do |test|
node = test.nodes.first
node.kind_of?(Ox::Element) && node.value == 'skipped'
end
Expand Down Expand Up @@ -112,13 +112,8 @@ parse_files result_files
message @failures.to_s

@failures.each do |failure|
#fail (failure.to_s)
# failure.map(&:attributes)
# fail("")
# msg = ""
# node = failure.nodes.first
msg = failure.locate("failure/*")
fail(msg.to_s)
fail(msg)
failure.nodes.each do |node|
node.nodes.each do |n|
message "#{n}"
Expand Down

0 comments on commit 08b456f

Please sign in to comment.