Skip to content

Added a basic spec for counts #219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 28, 2016
Merged

Conversation

donv
Copy link
Contributor

@donv donv commented Mar 26, 2016

The specs fail now since keys accumulate in the result hash. Considering filing a bug against Ruby.


result.should == {
@class_file => [
nil, nil, 1, nil, nil, 1, nil, nil, 0, nil, nil, nil, nil, nil, nil, nil
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is line 9 executed 0 times?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is in a method that is never called.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, I thought it was still the class body.

donv added 2 commits March 26, 2016 22:51
Pulled helper method to separate SpecHelper module
Used raise_error helper instead of customer begin...rescue

result.should == { @config_file => [1, 1, 1] }
end

it 'should list coverage for the required file starting coverage' do
require @config_file.chomp('.rb')
result = Coverage.result
result = Coverage.result.select { |k, v| v.any? || k == @config_file }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just do sth like Coverage.result[@config_file].should == [] here.

@eregon
Copy link
Member

eregon commented Mar 26, 2016

Getting pretty nice 😃

@eregon
Copy link
Member

eregon commented Mar 28, 2016

Thank you for these nice Coverage specs, merged!

@eregon eregon merged commit 3dba3bf into ruby:master Mar 28, 2016
@donv donv deleted the basic_coverage_specs branch March 28, 2016 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants