Fix Style/UnneededInterpolation

This commit is contained in:
Sidharth 2017-12-03 16:49:11 +05:30
parent 22247a0ac2
commit d5df7017d9
3 changed files with 3 additions and 9 deletions

View file

@ -702,12 +702,6 @@ Style/TrailingCommaInLiteral:
- 'db/migrate/20140701123203_add_events_per_week_to_conference.rb'
- 'spec/models/conference_spec.rb'
# Offense count: 3
# Cop supports --auto-correct.
Style/UnneededInterpolation:
Exclude:
- 'app/helpers/format_helper.rb'
- 'spec/controllers/admin/conferences_controller_spec.rb'
# Offense count: 2
# Configuration parameters: EnforcedStyle, SupportedStyles.

View file

@ -122,7 +122,7 @@ module FormatHelper
plural || singular.pluralize
end
"#{word}"
word.to_s
end
# Returns black or white deppending on what of them contrast more with the

View file

@ -56,8 +56,8 @@ describe Admin::ConferencesController do
conference.reload
expect(flash[:error])
.to eq("Updating conference failed. Short title can't be blank.")
expect(conference.title).to eq("#{conference.title}")
expect(conference.short_title).to eq("#{conference.short_title}")
expect(conference.title).to eq(conference.title.to_s)
expect(conference.short_title).to eq(conference.short_title.to_s)
end
it 're-renders the #show template' do