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

Add expose_current_running_example_as config option. #1133

Merged
merged 3 commits into from
Nov 1, 2013

Conversation

myronmarston
Copy link
Member

Fixes #963.

@myronmarston
Copy link
Member Author

Anyone want to review this? /cc @xaviershay @JonRowe @samphippen @alindeman @soulcutter

@soulcutter
Copy link
Member

Looks good to me. Might be worth documenting in cucumber.

@fables-tales
Copy link
Member

I agree with @soulcutter a cucumber would be useful as this ends up being a user facing option.

@myronmarston
Copy link
Member Author

Thanks, @soulcutter and @samphippen!

I just pushed two more small commits -- just some improvements to the spec.

As for docing it with a cuke: I'd actually rather not give it that kind of visibility. This config option isn't one I'd normally recommend you use. It exists purely to assist with upgrades from 2.x where the user depends on some gem that uses the old example API. I'm planning to backport this to 2.99 and mention this in the deprecation notice issued from RSpec::Core::ExampleGroup#example and RSpec::Core::ExampleGroup#running_example, which will give it visibility to exactly the set of users this is intended for.

@soulcutter
Copy link
Member

I did wonder how visible this configuration option was meant to be :) That explains it!

Good catch about leaking the Module changes.

soulcutter added a commit that referenced this pull request Nov 1, 2013
Add `expose_current_running_example_as` config option.
@soulcutter soulcutter merged commit d5b58a4 into master Nov 1, 2013
@soulcutter soulcutter deleted the expose_current_running_example_as branch November 1, 2013 16:55
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.

RSpec.configuration.expose_current_running_example_as :example
3 participants