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

Adding task state #3

Merged
merged 1 commit into from
Nov 23, 2018
Merged

Adding task state #3

merged 1 commit into from
Nov 23, 2018

Conversation

dim
Copy link
Member

@dim dim commented Nov 23, 2018

10.times do
subject.with('sums') {|s| s[:sum] += rnd.rand(10) }
end
expect(subject['sums']).to eq(sum: 53)
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh. Are you sure? Probs, better just do a counter without anything random?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, that was just to demonstrate that you can use it with something that has its external state (like the seeded random). it's working fine

@dim dim merged commit 3eda325 into master Nov 23, 2018
@dim dim deleted the feature/state branch June 12, 2019 14:29
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