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

Correct whitespace braces around hash parameters #1315

Merged
merged 1 commit into from
Aug 31, 2014
Merged

Correct whitespace braces around hash parameters #1315

merged 1 commit into from
Aug 31, 2014

Conversation

jspanjers
Copy link
Contributor

No description provided.

end

it 'one hash parameter with braces and separators' do
corrected = autocorrect_source(cop, ['where( ',
' { x: 1 } )'])
' { x: 1 } )'])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why the extra space here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

right, no good reason for that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well actually, it tests that ALL whitespace between the { and the start of its contents is removed, not just ONE space.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think there should a separate example for this to make it more apparent that this behavior is being tested.

@bbatsov
Copy link
Collaborator

bbatsov commented Aug 31, 2014

You should also update the changelog.

@jspanjers
Copy link
Contributor Author

Updated changelog and added tests.

@bbatsov
Copy link
Collaborator

bbatsov commented Aug 31, 2014

Apart from my changelog entry remark - looks good. Update the changelog and squash the commits into one.

@jspanjers
Copy link
Contributor Author

Changelog entry moved to 'bugs fixed' section and squashed commits into one.

bbatsov added a commit that referenced this pull request Aug 31, 2014
…aces-around-hash-parameters

Correct whitespace braces around hash parameters
@bbatsov bbatsov merged commit ff65412 into rubocop:master Aug 31, 2014
@bbatsov
Copy link
Collaborator

bbatsov commented Aug 31, 2014

👍

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