-
-
Notifications
You must be signed in to change notification settings - Fork 753
Conversation
@@ -20,52 +21,85 @@ def initialize(configuration=RSpec.configuration) | |||
} | |||
end | |||
|
|||
# @api private |
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.
@myronmarston some of these things seem public to me, WDYT
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.
Most of these methods are meant for internal use and don't really have an intended use by end users or extension gem developers. The one exception I can think of is reset
-- I think I saw discussion of it being used for an alternate parallel runner at some point.
That said, RSpec.world
is itself labeled as private (see 1354f1a, where it was labeled that way).
I think the class as a whole should be labeled @api private
. Anything that's actually needed as a public API should be exposed off of RSpec.
, and all the private APIs off of RSpec.
should be removed so that RSpec.
is the global entry point for the public APIs.
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.
So should I take @api private
off of reset
for the time being or leave it there in anticipation of #1338?
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.
Leave it on there. Then there'll be less to do later.
I did a code search for world.reset
:
https://github.com/search?l=ruby&q=%22world.reset%22&ref=searchresults&type=Code
And it looks like there are some things relying on it. When we do #1338 we should probably issue a deprecation warning from 2.99 and ensure there's a proper public API to do the resetting off of RSpec
.
Thank you for taking a stab at this, I have a few bits of feedback and some Q's for @myronmarston about our intent here, as I think some of these are "@public" from a "API we expose to other developers" POV |
Thanks for doing this, @alexander-clark! This actually helped clarify some of my thinking here -- see #1338. |
No problem. Thanks for the quick feedback. Just had one question, left it as a note at the top since it was related to that thread. |
Pushed new commit with updates. |
documentation for RSpec::Core::World
Thanks @alexander-clark |
Just dropping some lines off for those settings that are self explanatory accessors. [skip ci]
Just dropping some lines off for those settings that are self explanatory accessors. [skip ci]
Taking a stab at documenting the World class. Any feedback would be appreciated.