test/integration/logger_test.rb in filum-1.0.3 vs test/integration/logger_test.rb in filum-2.0.0
- old
+ new
@@ -36,19 +36,19 @@
def test_info_string_is_correct
random_string = [*'a'..'z'].sample(10).join
Filum.logger.info "Foobar #{random_string}"
assert_logged(/Foobar #{random_string}$/)
end
-
+
def test_caller_line_is_correct
expected_file = 'logger_test.rb'
expected_line = __LINE__+1
Filum.logger.info "Foobar"
assert_logged(/#{expected_file}:#{expected_line}/)
end
private
def assert_logged(regex)
- assert File.readlines(Filum.config.logfile).grep(regex).size == 1
+ assert File.readlines(Filum.logger.logfile).grep(regex).size == 1
end
end
end