Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Conversation

myronmarston
Copy link
Member

This is a follow up to #1236. It's @michihuber's work plus the start of fixes I've applied based on mine and @JonRowe's feedback on that PR. This supercedes that PR.

Michi Huber and others added 13 commits January 22, 2014 23:23
Conflicts:
	lib/rspec/core/example_group.rb
We've occasionally received bug reports related to
users having objects that redefine `send` (e.g.
`Email#send`), and using `__send__` is best to avoid
those problems.

Many of the receivers of `__send__` here are objects
we own and that do not (and never will) redefine `send`;
however, for consistency, it's good to standardize on
`__send__`. That way, we're less likely to forget it in
the future for a case where it does matter.
This already worked but wasn't covered by a test.
- Cover all the edge cases.
- Use a subprocess for global config changes.
- No need to use a separate example group per method.
  It adds to the runtime of the test suite with no benefit.
Before, they were not exposed globally if the config option
was already set.
- No need to use send.
- Extract change_global_dsl helper method.
@michihuber
Copy link
Contributor

Thanks @myronmarston for taking over!
(I just came back online, which is why I couldn't continue working on this earlier.)

- Make it a predicate w/ a question mark.
- Make it actually indicate if the DSL is exposed globally.
We don't need to expose it at the top level, and
it's best to cut down on what's exposed.
@myronmarston
Copy link
Member Author

OK, I think this is ready to merge. @michihuber / @JonRowe -- care to review what I've done on top of #1236?

@myronmarston
Copy link
Member Author

Anyone want to review this?

/cc @JonRowe @xaviershay @samphippen @alindeman @soulcutter

Copy link
Member

Choose a reason for hiding this comment

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

This doesn't "prove" the :detailed => true part of the alias, do we care? Perhaps we could assert on the metadata?

Scratch that I see you're using tags.

Copy link
Member Author

Choose a reason for hiding this comment

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

Honestly, I'm not super happy with this cucumber example. Got a better idea?

@JonRowe
Copy link
Member

JonRowe commented Jan 28, 2014

Apart from my white space niggle, LGTM :P

myronmarston added a commit that referenced this pull request Jan 28, 2014
@myronmarston myronmarston merged commit 729f2f7 into master Jan 28, 2014
@myronmarston myronmarston deleted the pr-1236-rebased branch January 28, 2014 16:21
@xaviershay xaviershay changed the title Pr 1236 rebased Alias example group Apr 27, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants