Skip to content

100% doc coverage #616

Merged
merged 6 commits into from Mar 6, 2014

5 participants

@xaviershay
RSpec member

@samphippen I wasn't sure what to do with the remaining any instance stuff, could you please have a look?

Undocumented Objects:

(in file: lib/rspec/mocks/any_instance/chain.rb)
RSpec::Mocks::AnyInstance
RSpec::Mocks::AnyInstance::Chain::Customizations
RSpec::Mocks::AnyInstance::Chain::Customizations.record
RSpec::Mocks::AnyInstance::Chain

(in file: lib/rspec/mocks/configuration.rb)
RSpec::Mocks::Configuration#yield_receiver_to_any_instance_implementation_blocks=

@myronmarston

Fixes #585

@arthurnn

Why this change? as far as I understand the difference, @api private should be used, so public class/methods will be marked as private API, instead of hidden them on the docs.

RSpec member

These methods are not relevant to the intended audience of our published API docs. Including them adds tons of noise to the docs.

RSpec member

:+1:

@myronmarston
RSpec member

These changes all look good to me. We can always merge this as-is and then address the last few undoc'd things.

There's also these warnings from YARD:

➜  rspec-mocks git:(issue-585) bin/yard stats --list-undoc
[warn]: Unknown tag @public in file `lib/rspec/mocks/error_generator.rb` near line 5
[warn]: Unknown tag @public in file `lib/rspec/mocks/error_generator.rb` near line 10
[warn]: Unknown tag @public in file `lib/rspec/mocks/error_generator.rb` near line 14
[warn]: @param tag has unknown parameter name: name
    in file `lib/rspec/mocks/example_methods.rb' near line 34
[warn]: @param tag has unknown parameter name: stubs
    in file `lib/rspec/mocks/example_methods.rb' near line 34
[warn]: @param tag has unknown parameter name: stubs
    in file `lib/rspec/mocks/example_methods.rb' near line 48
[warn]: @param tag has unknown parameter name: stubs
    in file `lib/rspec/mocks/example_methods.rb' near line 63
[warn]: @param tag has unknown parameter name: stubs
    in file `lib/rspec/mocks/example_methods.rb' near line 78
[warn]: @param tag has unknown parameter name: *expected_args
    in file `lib/rspec/mocks/argument_list_matcher.rb' near line 46
[warn]: @param tag has unknown parameter name: block
    in file `lib/rspec/mocks/argument_list_matcher.rb' near line 46
[warn]: @param tag has unknown parameter name: *args
    in file `lib/rspec/mocks/argument_list_matcher.rb' near line 63
[warn]: Unknown tag @override in file `lib/rspec/mocks/verifying_message_expecation.rb` near line 27

Would be cool to address those at the same time but that's definitely not a merge blocker.

I just kicked the build (which had a transient bundler failure). @xaviershay feel free to merge this whenever. We should #585 open until we hit 100% (and have the build fail if we don't stay at 100%), though.

@samphippen
RSpec member

@xaviershay cool if I write some docs and push them at this branch?

@xaviershay
RSpec member

@samphippen do it

@xaviershay
RSpec member

Not sure how to fix the example_methods.rb warnings ... I want to keep *args because we're passing it straight through to another method.

@samphippen
RSpec member

@xaviershay I'm going to get to this tomorrow morning my time. Should be ready by the time you're awake tomorrow your time.

@samphippen
RSpec member

@myronmarston @xaviershay do you think the module RSpec::Mocks::AnyInstance should be marked @private. I think yes, everything in there is pretty implementation specific.

@myronmarston
RSpec member

@myronmarston @xaviershay do you think the module RSpec::Mocks::AnyInstance should be marked @private. I think yes, everything in there is pretty implementation specific.

Yes.

@samphippen
RSpec member

@xaviershay I think I've done all the anyinstance docs now. Let me know if you'd like anything extra

@xaviershay
RSpec member

Merging. As noted, don't know what to do about the example method warnings.

Assuming that rspec-dev changes will end up enforcing this in the build and that I don't need to worry about that part.

> yard stats --list-undoc
[warn]: @param tag has unknown parameter name: name
    in file `lib/rspec/mocks/example_methods.rb' near line 34
[warn]: @param tag has unknown parameter name: stubs
    in file `lib/rspec/mocks/example_methods.rb' near line 34
[warn]: @param tag has unknown parameter name: stubs
    in file `lib/rspec/mocks/example_methods.rb' near line 48
[warn]: @param tag has unknown parameter name: stubs
    in file `lib/rspec/mocks/example_methods.rb' near line 63
[warn]: @param tag has unknown parameter name: stubs
    in file `lib/rspec/mocks/example_methods.rb' near line 78
Files:          16
Modules:        10 (    0 undocumented)
Classes:         7 (    0 undocumented)
Constants:       4 (    0 undocumented)
Methods:        73 (    0 undocumented)
 100.00% documented
@xaviershay xaviershay merged commit dbd5533 into master Mar 6, 2014

1 check passed

Details default The Travis CI build passed
@myronmarston
RSpec member

As noted, don't know what to do about the example method warnings.

I've opened a yard ticket: lsegal/yard#746

@JonRowe JonRowe deleted the issue-585 branch Mar 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.