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

Simplify data creation in poll factories #3723

Merged
merged 2 commits into from
Sep 25, 2019
Merged

Conversation

javierm
Copy link
Member

@javierm javierm commented Sep 24, 2019

References

Objectives

  • Make it easier to associate booths and poll officers to polls in specs
  • Reduce the number of unused variable warnings given by the Ruby interpreter

@javierm javierm added the Specs label Sep 24, 2019
@javierm javierm self-assigned this Sep 24, 2019
@javierm javierm added this to Reviewing in Roadmap via automation Sep 24, 2019
spec/features/officing/voters_spec.rb Show resolved Hide resolved
spec/features/officing/voters_spec.rb Show resolved Hide resolved
spec/features/officing/voters_spec.rb Show resolved Hide resolved
spec/features/officing/voters_spec.rb Show resolved Hide resolved
spec/features/officing/voters_spec.rb Show resolved Hide resolved
spec/features/officing/voters_spec.rb Show resolved Hide resolved
@javierm javierm changed the base branch from use_traits to master September 25, 2019 10:30
While it could be argued we're hiding the real way we've defined
associations in our models, the tests are so much easier to read when we
don't have so many lines just creating data.

Furthermore, developers who care about vertically aligning the code will
be glad to see some variables disrupting this alignment are now gone.
We were creating booth assignments explicitely, but we can use the
`has_many :through` relationship to make the code easier to read.
@javierm javierm merged commit 6ae764c into master Sep 25, 2019
Roadmap automation moved this from Reviewing to Release 1.1.0 Sep 25, 2019
@javierm javierm deleted the simplify_poll_factories branch September 25, 2019 12:42
smarques pushed a commit to venetochevogliamo/consul that referenced this pull request Apr 29, 2020
…tories

Simplify data creation in poll factories
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Roadmap
  
Release 1.1.0
Development

Successfully merging this pull request may close these issues.

None yet

2 participants