Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Viewing all articles
Browse latest Browse all 4636

Detect that code run by RSpec, Ruby

$
0
0

I would like to be able to know that my code is run under rspec or not. Is this possible?

The reason is that I am loading some error loggers that would be cluttered with deliberate errors (expect{x}.to raise_error) during testing.

I have looked at my ENV variable, and there is no (apparent) signs of a test environment variable.


Viewing all articles
Browse latest Browse all 4636

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>