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

Factorize common DynamicPredicate base.#1197

Merged
JonRowe merged 1 commit intorspec:mainfrom
marcandre:refactor_same_output
Aug 27, 2020
Merged

Factorize common DynamicPredicate base.#1197
JonRowe merged 1 commit intorspec:mainfrom
marcandre:refactor_same_output

Conversation

@marcandre
Copy link
Contributor

@marcandre marcandre commented Jun 18, 2020

The has_... and be_... dynamic predicate matchers have a lot in common.

This PR refactors both in terms of a common base class.

Output is kept the same temporarily

Precursor to #1195

Copy link
Member

@pirj pirj left a comment

Choose a reason for hiding this comment

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

Looks good.
Travis is actually green (slow to report?)

@marcandre marcandre force-pushed the refactor_same_output branch from 07fdde0 to 6eebf29 Compare July 30, 2020 14:20
@JonRowe JonRowe changed the base branch from master to main August 2, 2020 02:05
Output is kept the same temporarily
@marcandre marcandre force-pushed the refactor_same_output branch from 6eebf29 to c028a9a Compare August 26, 2020 17:39
@marcandre
Copy link
Contributor Author

Rebased, just to be sure.

@JonRowe could this be merged please? Two subsequent PRs are waiting on this.

Copy link
Member

@JonRowe JonRowe left a comment

Choose a reason for hiding this comment

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

Sorry for the delay, after having had the time to finally give this a proper review, I have two questions.

Comment on lines +89 to +91
def predicate_method_name
predicate
end
Copy link
Member

@JonRowe JonRowe Aug 27, 2020

Choose a reason for hiding this comment

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

I feel like this should be in the Has class as this implementation is only used there? (I've checked the other PR so I think thats the case?)

Copy link
Member

@JonRowe JonRowe Aug 27, 2020

Choose a reason for hiding this comment

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

Ah actually, I see, its not used elsewhere in has, ignore this comment. Commented on the wrong comment.

Copy link
Member

@JonRowe JonRowe left a comment

Choose a reason for hiding this comment

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

Answered my own question and the remaining one is not a blocker.

@JonRowe JonRowe merged commit 8c68e05 into rspec:main Aug 27, 2020
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.

3 participants