-
-
Notifications
You must be signed in to change notification settings - Fork 390
Started adding spec for coverage #217
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
Conversation
Hi @donv! |
config_file = File.expand_path('../fixtures/start_coverage.rb', __FILE__) | ||
|
||
describe "Coverage.result" do | ||
it "needs to be reviewed for spec completeness" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed as soon as there are specs, even if they are not exhaustive.
Looks good overall! |
e6ec9e8
to
ea2e8a7
Compare
OK, applied all the comments except the separate spec for disabled coverage since there is no query. Looks good? |
What's the deal with the failing AppVeyor check? |
Ah! It is for windows. Does this mean MRI on windows is failing Ruby Spec? |
|
||
describe 'Coverage.result' do | ||
before :all do | ||
@config_file = File.expand_path('../fixtures/start_coverage.rb', __FILE__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an actual fixture
helper which should do exactly the same 😉 , as in https://github.com/ruby/spec/blob/master/core/module/autoload_spec.rb#L18.
Rather than Ruby Spec is still having too many expectations (on Unix features) for Windows. |
55095a6
to
dbaf24f
Compare
@@ -0,0 +1,3 @@ | |||
2 + 2 | |||
Coverage.start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does the Coverage.start does here? It seems only line 1 is reported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is to test coverage for the file that calls Coverage.start.
Thank you for your contribution! |
Thank you for this vital project! |
My first contribution to ruby/spec, so I expect to have to change a lot.
First question is that the specs seem organized around methods, but coverage is typically the interaction between the
Coverage.start
andCoverage.result
methods. How should the specs for this interaction be organized?