I know there is a way to know which specs are taking the most time, but my doubt is about the loading of the RSpec. The specs itself are not taking too much time, but the load is.
There is a way to discover that?
I am working on a Rails' legacy code and I don't know which gems could be affecting it.
For anyone who comes here, the problem was that the RSpec was truncating every time I ran the tests.
I discovered it by checking the log while it was starting (tail -f log/test.log
).
To solve that, I used the database_cleaner gem and configured it with :transaction
as the clean strategy.
config.before(:each) do
DatabaseCleaner.strategy = :transaction
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With