Skip to content

Commit

Permalink
fixup! Add a hopefully more useful arbua failure display
Browse files Browse the repository at this point in the history
  • Loading branch information
acant committed Oct 2, 2015
1 parent 22b8c4b commit 1d1d7a8
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions test/integration/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,25 +61,6 @@ def before_setup
GitFactory.working_directory = abs_current_dir
end

def after
unless passed?
puts "\n\n----------------------------------"
puts "Aruba details for failure: #{name}"

log_filename = File.join(abs_current_dir, '.gitdocs', 'log')
if File.exist?(log_filename)
puts "Log file: #{log_filename}"
puts File.read(log_filename)
end

if Dir.exist?(current_dir)
`find #{current_dir}`
end

puts "\n\n----------------------------------"
end
end

def teardown
Capybara.reset_sessions!
Capybara.use_default_driver
Expand All @@ -103,6 +84,25 @@ def after_teardown
end
FileUtils.rm_rf(PID_FILE)
end

# Report gitdocs execution details on failure
unless passed?
puts "\n\n----------------------------------"
puts "Aruba details for failure: #{name}"

log_filename = File.join(abs_current_dir, '.gitdocs', 'log')
if File.exist?(log_filename)
puts "Log file: #{log_filename}"
puts File.read(log_filename)
end

if Dir.exist?(current_dir)
`find #{current_dir}`
end

puts "\n\n----------------------------------"
end

end

# @param [String] method pass to the CLI
Expand Down

0 comments on commit 1d1d7a8

Please sign in to comment.