paveldruzyak/language-rspec — pull request #11 by ryansobol (2014-09-10 21:25:02+00:00)
Title: Switch to single quotes for snippets

RSpec 3.1 out the door and this package could use some modernization. I've got a laundry list of improvements queued up, but it's probably better to start small...

This pull request migrates the generated code from snippets over to single-quoted strings. Where ever you fall on the double vs single quote debate is fine. However, the current best practice in the Ruby community is to prefer single-quoted strings when you don't need string interpolation or special symbols.

This best practice is best codified with rubocop, the jshint of Ruby

https://github.com/bbatsov/rubocop/blob/master/lib/rubocop/cop/style/string_literals.rb#L15

Rubocop is maintained by a global community of Ruby developers. And it's purpose is to ensure that no matter where or how a developer learned Ruby, everyone can easily read their code.

Because of it's popularity (and similarity with jshint), more and more production apps are leveraging rubocop to ensure a consistent code style. I believe it makes sense to align the defaults of the language-rspec package to the best practices defined in rubocop.

What say you?