-
Notifications
You must be signed in to change notification settings - Fork 55
Description
I have a code and I declare a scope, as line bellow:
scope :with_snapshot_histories,
-> { where(SCOPE_STR) }
In this case simplecov-rcov return "NOT OK", but if I declare scope in one line the result becomes OK.
scope :with_snapshot_histories, -> { where(SCOPE_STR) }
This situation also happens when I have a block (bellow):
NOT OK:
scope :service_codes_by_login, (lambda do |login|
joins(:account)
.where(accounts: {login: "#{login}/#{login}"})
.select(:service_code)
end)
OK:
scope :service_codes_by_login, (lambda do |login| joins(:account).where(accounts: {login: "#{login}/#{login}"}).select(:service_code) end)
Is this a problem? Or is this a expected comportment?
This situation affect the result of our coverage.
Result (2 lines) - 85.58% / 73.03 :

Result (1 line) - 85.64% / 73.15%

Coverage's difference:
Result (2 lines) - 85.58% / 73.03%
Result (1 line) - 85.64% / 73.15%

