rubocop-minitest
rubocop-minitest copied to clipboard
Newline before assert
In our tests we try to keep all assertions at the last line(s), and always a newline in-between.
Don't know if this is something others prefer, but thought I'd add the issue here. If others find it useful too, maybe it's something that could be added as a cop.
test 'user tokens contains name and email' do
@user.name = 'John Doe'
@user.primary_email = '[email protected]'
assert_includes(@user.tokens, 'John')
assert_includes(@user.tokens, 'Doe')
assert_includes(@user.tokens, '[email protected]')
end