-
-
Notifications
You must be signed in to change notification settings - Fork 753
Add additional rdoc example for ordering #2248
Conversation
# @example | ||
# RSpec.configure do |rspec| | ||
# rspec.register_ordering :global do |examples| | ||
# acceptance, other = examples.paritition do |example| |
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.
s/paritition/partition/
fc8ea09
to
d584f0e
Compare
In the future, please write an example snippet like this in a real project and copy it in so you've actually demonstrated it working, @JonRowe. Simple mistakes like you had here are easy for anyone to do, but we do our users a disservice if we merge broken example code in our docs. |
Apologies I did this last night then forgot to check it over, it actually is a snippet from a real project, I had just over simplified it. FYI the original was: config.register_ordering :global do |examples|
api, rest = examples.partition { |ex| ex.metadata[:api] }
app, rest = rest.partition { |ex| ex.metadata[:app] }
randomiser = config.ordering_manager.ordering_registry.fetch(:random)
[rest, api, app].inject([]) do |specs, more|
specs += randomiser.order(more)
end
end |
# Sets the default global order and, if order is `'rand:<seed>'`, also | ||
# sets the seed. | ||
# Sets the default global ordering strategy. By default this can be one | ||
# of `:defined`, `:random`, but is customisable through the |
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.
We've tend to use the American spelling with a z
:
➜ repos git:(master) ack customize | wc -l
65
➜ repos git:(master) ack customise | wc -l
2
Mind spelling it with a z
for consistency?
d584f0e
to
e314934
Compare
@myronmarston I double checked it rendered correctly |
e314934
to
b6a675c
Compare
Add additional rdoc example for ordering
No description provided.