I have created this small sample code https://github.com/jeevan1987cool/sample-rspec-logging.
The issue with this is that it creates a new log file for every test. I have two tests in spec/first_test.rb. I have tried IO Open Modes also to fix it but none worked. Either it creates a new log file or keeps appending in the previous file.
However, what I am looking for is 1 file for an e2e execution. So if one e2e execution has 20 tests, then there won’t be 20 log files, but each test’s logs will be appended one below the other.
How can I fix this?