This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
it should receive example metadata #148
Comments
Basically what I'm trying to avoid is writing code like this: describe("in some context") {
var metadata: ExampleMetadata?
beforeEach(closure: { (exampleMetadata) -> () in
metadata = exampleMetadata
})
it("has valid snapshot") {
/* access metadata */
}
... |
And instead write the following: describe("in some context") {
it("doesn't care about metadata") {
...
}
it("has valid snapshot") { (exampleMetadata) -> () in
/* access exampleMetadata */
}
... |
Totally agree. Make sure to check out the metadata being passed to before/after blocks, and use those in your PR if you can (or change them as need be to make that possible). Also, take a look at how RSpec does it--can't go wrong copying their approach. Bonus points if you also port the functionality to Objective-C! 💯 |
I will do my best. |
@modocache What are your thoughts on automatically supplying this information to matchers, too? |
Not to put things off but weren't we suppose to try and build a reporter infrastructure instead of encouraging using this more temporary metadata feature? |
I really have no horse in this race – I just want to be able to fix ashfurrow/Nimble-Snapshots#6 . It's totally possible to have a long-term plan of having a reporter infrastructure but for now I'd rather get working software. |
@jeffh I think custom reporters are necessary to customize the output when you run Also, GitHub email response formatting ain't great. In case you missed it, @ashfurrow, this was my entire comment from earlier:
I haven't had the time to think about metadata and matchers yet, sorry--I'll comment here again later once I've given it some thought. |
I'm sorry if I sounded too strong-willed. The first argument could also be used for async callback completion (eg - jasmine, mocha, gingko), which seems more generally useful than example metadata. But if we're not honoring any public API contracts right now I'm fine with it. |
For the record, I still think this is worth doing--I just keep putting it on the back burner... 😶 |
It happens – don't let it get you down! |
…ns (Issue Quick#148), as well as the toNotEventually() ObjC method, which was missing
What's the status on this @ashfurrow? :) |
We were able to fix my issue without this, so it fell off my radar. I can take a look at making a PR after Labour Day. |
Bringing attention back to this issue since it's after Labour Day. 🐱 @ashfurrow Do you have more free time these days? |
I regret to say that I haven't had time to look at this, and likely won't until the holidays. I'll remove myself as an assignee in case someone else wants to tackle it, but I'll put a calendar reminder to look at it over xmas 👍 |
No problem. Thanks! |
I know I'm a little late (not xmas) but just in case you're looking for something to do during the holiday/new years season, @ashfurrow. :D No worries if not though. |
I'm afraid I never got to this, my schedule is pretty busy coming up so I don't think I'll be able to tackle it in the near future. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
In
it
calls, the closure should (optionally) receive example metadata in the same way thatbeforeEach
does.I don't see this being a contentious API change, and is non-breaking, so I'm going to begin work on it and get back to you with a PR for feedback.
The text was updated successfully, but these errors were encountered: