Did you find an answer?
On 2021-6-11 11:30 pm, Joao Miguel Ferreira wrote:
> Hello all,
> Is there a way to ask rspec to print the path of the file from which
> tests are being run?
Today, while reading the 'Effective Testing with RSpec 3' book, I found
that you can access metadata in the context level:
RSpec.describe 'My Exciting Class' do
context 'when condition' do
it 'succeeds' do
The metadata outputs a bunch of stuff, including :file_path and
Hope this helps.
2021-6-21 | 8:07 pm.