Created
March 17, 2012 00:46
-
-
Save chrisnicola/2053919 to your computer and use it in GitHub Desktop.
Tddium test log folder helper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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