rubocop -a

This commit is contained in:
2017-02-26 18:22:28 +01:00
parent b56fc79f81
commit 9df54eeade
5 changed files with 9 additions and 8 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ class ApplicationController < ActionController::Base
# calculate how long a user needed for a form input, ussually we just
def input_to_fast?
fail 'session[:form_timestamp] not set' unless session[:form_timestamp]
raise 'session[:form_timestamp] not set' unless session[:form_timestamp]
duration = Time.now - session[:form_timestamp].to_time
duration < INPUT_TIMEOUT
end
+4 -3
View File
@@ -8,8 +8,8 @@ class MailChimpBatchUpdate
subscribers = []
Supporter.each_with_index do |supporter, index|
subscribers.push(subscriber supporter)
if index.modulo(20) == 0
subscribers.push(subscriber(supporter))
if index.modulo(20).zero?
batch_subscribe(subscribers)
subscribers = []
end
@@ -32,7 +32,8 @@ class MailChimpBatchUpdate
'MEMBERSHIP' => supporter.li_membership.to_s,
'AGE' => supporter.age_category,
'LANG' => supporter.language,
'ZIP' => supporter.zip } }
'ZIP' => supporter.zip
} }
end
def update_unsubscibed
+1 -1
View File
@@ -4,7 +4,7 @@ describe ApplicationHelper do
describe '.title' do
it 'sets content for :title' do
helper.title 'test'
expect(view.content_for :title).to eq 'test'
expect(view.content_for(:title)).to eq 'test'
end
end
end