Closed mario-amazing closed 1 year ago
stub_all! doesn't affect coverage. Is coverage collected for other classes in other tests?
You are right, stub_all does not affect this. But the coverage is still 0%. But the coverage is empty only for telegram controllers
Found solution, simplecov should be the first line in rails_helper:
require 'simplecov'
SimpleCov.start 'rails'
Telegram.reset_bots
Telegram::Bot::ClientStub.stub_all!
SimpleCov doesn't see request to TelegramWebhookControlle controllers with ClientStub.
How to fix this behaviour?