sites
sites

Reputation: 21815

RSpec log showing in console

Where should I configure this for log to be in log/test.log or what keyword should I look in my project to change this config.

I tried with log in spec no results, there is no STDOUT in spec either.

Upvotes: 1

Views: 2380

Answers (1)

Kirti Thorat
Kirti Thorat

Reputation: 53048

run rspec with -o option or you could specify this option in .rspec file.

For eg:

rspec -o log/test.log

But the above will overwrite log file each run. In order to save the previous log messages, you need to do as below,

rspec >> log/test.log

>> will always append to log file.

Upvotes: 2

Related Questions