diff --git a/lib/pro_tacts/config.rb b/lib/pro_tacts/config.rb
index 3aafa2f..e37e755 100644
--- a/lib/pro_tacts/config.rb
+++ b/lib/pro_tacts/config.rb
@@ -56,9 +56,9 @@ module ProTacts
# PRO_TACTS_EXCHANGE_LOG; "stderr" keeps it on the process's stderr.
# Under log/ because it holds request data and is not meant to be
# committed. See ProTacts::ExchangeLog.
- #: () -> String
+ #: () -> Pathname
def exchange_log_path
- @env.fetch("PRO_TACTS_EXCHANGE_LOG", data_dir / "log/exchange.log")
+ Pathname.new(@env.fetch("PRO_TACTS_EXCHANGE_LOG", data_dir / "log/exchange.log"))
end
# The CardDAV account's display name, PRO_TACTS_PROFILE_NAME — what
diff --git a/test/pro_tacts/test_config.rb b/test/pro_tacts/test_config.rb
index 8449438..8dc0a5a 100644
--- a/test/pro_tacts/test_config.rb
+++ b/test/pro_tacts/test_config.rb
@@ -50,12 +50,12 @@ class ConfigTest < Minitest::Test
end
def test_exchange_log_path_defaults_to_a_file
- assert_equal "log/exchange.log", ProTacts::Config.new({}).exchange_log_path
+ assert_equal Pathname.new("data/log/exchange.log"), ProTacts::Config.new({}).exchange_log_path
end
def test_exchange_log_path_is_overridable
- assert_equal "/tmp/dav.log", ProTacts::Config.new("PRO_TACTS_EXCHANGE_LOG" => "/tmp/dav.log").exchange_log_path
- assert_equal "stderr", ProTacts::Config.new("PRO_TACTS_EXCHANGE_LOG" => "stderr").exchange_log_path
+ assert_equal Pathname.new("/tmp/dav.log"), ProTacts::Config.new("PRO_TACTS_EXCHANGE_LOG" => "/tmp/dav.log").exchange_log_path
+ assert_equal Pathname.new("stderr"), ProTacts::Config.new("PRO_TACTS_EXCHANGE_LOG" => "stderr").exchange_log_path
end
# nil rather than a default, so the fallback stays Profile's alone.