Skip to content

Fails to cover file loaded multiple times #389

Open
@Aethelflaed

Description

@Aethelflaed

I've a bot which defines each statement in a separate file to simplify testing.

To test the files, I remove all statements and then just load (not require, as it won't work) the ones I need for the specific test.

The coverage seems to work fine until I reach a test which loads all the statements.
If I had already tested e.g. ping.rb, and then this test runs, it will reload ping.rb anyway and reset all covering information about that file.

The coverage does not merge multiple loads of the same file but instead keeps only the last occurence.

I'm not sure but this may be due to ruby's Coverage and not Simplecov.

ruby 2.0.0p598 (2014-11-13 revision 48408) [x86_64-linux]
also tested with ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions