Skip to content
Browse files

Fix home directory lookup. [bug]

  • Loading branch information...
1 parent 3488ff9 commit 01bba4c4affb329a3096842a2fbde04776ddd3f0 @trans trans committed Nov 25, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/turn/configuration.rb
View
7 lib/turn/configuration.rb
@@ -188,7 +188,7 @@ def suite_name
# Get selected reporter with any mode decorator.
def reporter
- @reporter ||= decorate_reporter(choose_reporter_class.new($stdout, reporter_options))
+ @reporter ||= decorate_reporter(reporter_class.new($stdout, reporter_options))
end
# Load reporter based on output mode and return its class.
@@ -197,7 +197,8 @@ def reporter_class
class_name = rpt_format.to_s.capitalize + "Reporter"
path = "turn/reporters/#{rpt_format}_reporter"
- [$HOME, DIR.pwd].each do |dir|
+
+ [File.expand_path('~'), Dir.pwd].each do |dir|
file = File.join(dir, ".turn", "reporters", "#{rpt_format}_reporter.rb")
path = file if File.exist?(file)
end
@@ -223,7 +224,7 @@ def decorator_class
class_name = mode.to_s.capitalize + "Decorator"
path = "turn/decorators/#{mode}_decorator"
- [$HOME, DIR.pwd].each do |dir|
+ [File.expand_path('~'), Dir.pwd].each do |dir|
file = File.join(dir, ".turn", "decorators", "#{mode}_reporter.rb")
path = file if File.exist?(file)
end

0 comments on commit 01bba4c

Please sign in to comment.
Something went wrong with that request. Please try again.