Skip to content
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

Better fix for let definitions eagerly included #942

Merged
merged 6 commits into from Jun 11, 2013

Conversation

myronmarston
Copy link
Member

This is an alternate fix for #908. It changes when the LetDefinitions module gets included (delaying it until after configuration has included its modules and the group block has been eval'd) so that its method definitions take precedence when there is a naming collision. The tricky parts were:

  • implicit subject -- I had to refactor this to not use subject as module inclusion time.
  • SharedContext -- I rewrote this to use a simpler record/playback mechanism so that all it really does is store stuff that's eval'd on the example group when included.

@alindeman / @JonRowe -- thoughts?

BTW, the diff is a bit obfuscated by the fact that this includes a reversion of #937. If you want to see just the diff from what we originally had, you can see it here:

bbc83ce...better-fix-for-let-definitions-eagerly-included

…s, this will make behaviour more predictable"

This reverts commit ec4056a.
This is in prep for changing when the LetDefinitions module is included.
The use of `subject` from the `included` hook was causing problems when
I was trying to do that.
It needs to be included last so that its definitions can take precedence
in case of a name collision.
@coveralls
Copy link

Coverage Status

Coverage increased (+0%) when pulling a43d59d on better-fix-for-let-definitions-eagerly-included into 3efa3fd on master.

This is the current list of what it supports:

describe
context
hooks
before
append_before
prepend_before
after
prepend_after
append_after
around
run_hook
around_each_hooks_for
let
let!
subject
subject!
its
@coveralls
Copy link

Coverage Status

Coverage increased (+0%) when pulling 9fc9024 on better-fix-for-let-definitions-eagerly-included into 3efa3fd on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0%) when pulling 690a294 on better-fix-for-let-definitions-eagerly-included into 3efa3fd on master.

@myronmarston myronmarston deleted the better-fix-for-let-definitions-eagerly-included branch June 11, 2013 04:28
myronmarston added a commit that referenced this pull request Jun 11, 2013
myronmarston added a commit that referenced this pull request Jun 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants