Skip to content

Make name variable of Behavior open#906

Merged
ikesyo merged 1 commit into
Quick:masterfrom
VojtaStavik:behavior-name-class
Sep 7, 2019
Merged

Make name variable of Behavior open#906
ikesyo merged 1 commit into
Quick:masterfrom
VojtaStavik:behavior-name-class

Conversation

@VojtaStavik

@VojtaStavik VojtaStavik commented Jul 22, 2019

Copy link
Copy Markdown
Contributor

The PR is a byproduct of my article about using Behavior in Quick.

I believe the name variable of Behavior should be open so it's possible to override it and provide custom name, if needed.

@QuickBot

Copy link
Copy Markdown
1 Warning
⚠️ Need to add an unit test if you’re modifying swift source

Generated by 🚫 Danger

@ikesyo ikesyo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks for the PR 👍

/**
Override this variable if you want to provide custom name for this example group.
*/
open class var name: String { return String(describing: self) }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is exactly what I thought before and is not a breaking change, so it's safe to merge.

#821 (comment)

@ikesyo ikesyo merged commit 6bcaa39 into Quick:master Sep 7, 2019
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.

3 participants