-
-
Notifications
You must be signed in to change notification settings - Fork 911
Expose current spec for XCTest expectations #645
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
Conversation
Thanks for filing this PR, @pcantrell. I'm down for the change. Would you be able to prepare tests and docs for this change? |
I'm fine with the change with tests and docs 👍 |
@pcantrell: Would you be able to make tests and docs for this PR? |
1c2c405
to
f9032fe
Compare
it("returns nil when no spec is executing") { | ||
expect(currentSpecDuringSpecSetup).to(beNil()) | ||
} | ||
|
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.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
I’ve added tests and docs. I also made The user docs I wrote are entirely centered around XCTest expectations, since they’re the common use case for this. Let me know if what I wrote suits you. |
Generated by 🚫 danger |
IS there any progress being made on this PR? I was also googling around to understand how do i "fulfill" an expectation with Quick. |
@freak4pc It’s waiting for review. I just synced with the main branch, so it’s all ready for a merge if the core team likes it. |
Any chance to get this merged? |
bd0b798
to
ea7d540
Compare
I’ve rebased this against master, and it should once again be ready to merge pending CI. (I’m not sure why it’s tagged |
I'd love to see this merged, as it's a blocker for #680, which would make using Quick + Nimble much easier when dealing with |
This looks fantastic, thanks! 😍 Sorry it took me a while to get to review and merge 😢 |
Woohoo! Congrats @pcantrell ! P.S @modocache I'm not so involved in Quick so just wondering, how quickly (pun intended) does a new version get cut from master ? |
Thanks for getting this in! |
What about the state of the |
This provides a static
QuickSpec.current()
method which allows specs to get a reference to the currently executingQuickSpec
, which is essential for using XCTest expectations.This is an updated version of #331. It fixes #330 and #578.
There was a lot of high-minded discussion back then about different approaches to this problem, and indecision lead to nothing happening. This PR is an attempt to nudge Quick toward resolving the issue. Two arguments in favor of this solution:
If the Quick team is willing to accept this change, I’m happy to add tests and/or docs to the PR. Let me know.