Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

DRY up before/after blocks in consistency spec #24

Merged
merged 2 commits into from
May 23, 2022

Conversation

freshtonic
Copy link
Contributor

I'm unsure what the semantics are of before/after with no-arg (just a
block) so I'm being explicit.

@freshtonic freshtonic changed the title Fix flake DRY up before/after blocks in consistency spec May 23, 2022
UserInconsistent.collection.drop!
UserInconsistent.collection.create!
expect { UserInconsistent.collection(true).info }.to_not raise_error
describe "when the backing collection exists but is missing an index" do
Copy link
Contributor

Choose a reason for hiding this comment

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

RSpec will automagically concatenate all the nested descriptions together to create the "full" description of a given test, so there's no need to duplicate "when the backing collection exists" in these subgroups.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a copy pasta error - thanks!

Copy link
Contributor Author

@freshtonic freshtonic left a comment

Choose a reason for hiding this comment

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

Reviewed with @mpalmer

@freshtonic freshtonic merged commit 1490ea7 into main May 23, 2022
@freshtonic freshtonic deleted the fix-remaining-flakiness branch May 23, 2022 06:14
freshtonic added a commit that referenced this pull request Dec 21, 2022
DRY up before/after blocks in consistency spec
This pull request was closed.
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.

2 participants