We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
let
let!
There is no information which style is preferred.
let :user do build(:user, profile: profile).tap do |user| user.save validate: false end end let :user do build(:user, profile: profile).tap do |user| user.save validate: false end end let :user do build(:user, profile: profile).tap do |user| user.save validate: false end end
or
The text was updated successfully, but these errors were encountered:
It would be quite hard to formalize, as the boundaries are blurry.
Would
let(:user) do create(:user, <a lot of attributes that forced the author to use the multi-line syntax because of the max line length limitation>) end let(:another_user) { create(:user) } # nothing fancy
Why separate the two?
And on the other hand,
let(:user) { create(:user) } # the line above intentionally left blank as it separates unrelated setup let(:multiplier) { 3 } let(:divisor) { 5 }
Sorry, something went wrong.
Would you want to have this applied to all multiline blocks? If so, see rubocop/ruby-style-guide#823
No branches or pull requests
There is no information which style is preferred.
or
The text was updated successfully, but these errors were encountered: