Navigation Menu

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

Refactor factory_spec.rb to conform to Let's Not style #1345

Merged
merged 1 commit into from Jan 17, 2020
Merged

Conversation

richiethomas
Copy link
Contributor

For reference:

https://thoughtbot.com/blog/lets-not

TL;DR- there is consensus within thoughtbot that RSpec's subject, before, and let features are over-used in the Ruby community, and result in relatively hard-to-read tests.

This is one of several PRs which in-lines many of the declarations previously made using the above idioms.

spec/factory_bot/factory_spec.rb Outdated Show resolved Hide resolved
spec/factory_bot/factory_spec.rb Outdated Show resolved Hide resolved
spec/factory_bot/factory_spec.rb Outdated Show resolved Hide resolved
spec/factory_bot/factory_spec.rb Outdated Show resolved Hide resolved
spec/factory_bot/factory_spec.rb Outdated Show resolved Hide resolved
Copy link
Collaborator

@composerinteralia composerinteralia left a comment

Choose a reason for hiding this comment

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

I must have missed this one in my earlier reviews.

There might be some helper methods we can pull out later on, but lets merge for now to get rid of that pesky before block.

@richiethomas richiethomas merged commit ce2d997 into master Jan 17, 2020
@richiethomas richiethomas deleted the factory branch January 17, 2020 19:26
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.

None yet

2 participants