Skip to content
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

Introduce CachingMode.SCOPE #186

Merged
merged 1 commit into from
Mar 9, 2017
Merged

Introduce CachingMode.SCOPE #186

merged 1 commit into from
Mar 9, 2017

Conversation

raniejade
Copy link
Member

In this mode instances will be cached within the group the memoized
was created. This has the same semantics with beforeGroup and a local
variable declaration.

Resolves #165.

In this mode instances will be cached within the group the memoized
was created. This has the same semantics with `beforeGroup` and a local
variable declaration.

Resolves #165.
Copy link
Collaborator

@artem-zinnatullin artem-zinnatullin left a comment

Choose a reason for hiding this comment

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

👍


val recorder = executeTestsForClass(MemoizedSpec::class)

assertThat(recorder.testFailureCount, equalTo(0))
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: don't you want to also check that required amount of tests passed?

Copy link
Member Author

@raniejade raniejade Mar 9, 2017

Choose a reason for hiding this comment

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

I just want to check that there are no failures:

This should pass:

test("check") {
    assertThat(memoized1, !sameInstance(memoized2))
}

@raniejade raniejade merged commit 8da1a90 into master Mar 9, 2017
@raniejade raniejade deleted the caching-mode-scope branch March 9, 2017 14:16
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.

2 participants