Skip to content

Instantly share code, notes, and snippets.

@chrisnicola
Created March 17, 2012 00:46
Show Gist options
  • Save chrisnicola/2053919 to your computer and use it in GitHub Desktop.
Save chrisnicola/2053919 to your computer and use it in GitHub Desktop.
Tddium test log folder helper
# Returns a file located in /logs/ when running locally and in the Tddium log output on Tddium
# This allows custom logs and files to be included in the Tddium test results
class Helpers
def self.test_log_path filename
if (ENV['TDDIUM_SESSION_ID'])
File.expand_path("#{ENV['HOME']}/results/#{ENV['TDDIUM_SESSION_ID']}/#{ENV['TDDIUM_TEST_EXEC_ID']}/") + '/' + filename
else
File.expand_path('log/') + '/' + filename
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment