Commit abfb95dae035bdb19fdfea94a663833bb6aae744

Authored by Laust Rud Jacobsen
1 parent 9725017b
Exists in master and in 1 other branch production

Rubocop: spaces around and within block braces

.rubocop_todo.yml
... ... @@ -270,18 +270,6 @@ Style/SingleSpaceBeforeFirstArg:
270 270 - 'spec/fabricators/notice_fabricator.rb'
271 271 - 'spec/fabricators/user_fabricator.rb'
272 272  
273   -# Offense count: 27
274   -# Cop supports --auto-correct.
275   -# Configuration parameters: EnforcedStyle, SupportedStyles.
276   -Style/SpaceBeforeBlockBraces:
277   - Enabled: false
278   -
279   -# Offense count: 75
280   -# Cop supports --auto-correct.
281   -# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
282   -Style/SpaceInsideBlockBraces:
283   - Enabled: false
284   -
285 273 # Offense count: 873
286 274 # Cop supports --auto-correct.
287 275 # Configuration parameters: EnforcedStyle, SupportedStyles.
... ...
app/controllers/apps_controller.rb
... ... @@ -39,7 +39,7 @@ class AppsController < ApplicationController
39 39 }
40 40  
41 41 expose(:users) {
42   - User.all.sort_by {|u| u.name.downcase }
  42 + User.all.sort_by { |u| u.name.downcase }
43 43 }
44 44  
45 45 def index; end
... ... @@ -96,7 +96,7 @@ protected
96 96 # set the app's notification service
97 97 if params[:app][:notification_service_attributes] && (notification_type = params[:app][:notification_service_attributes][:type])
98 98 available_notification_classes = [NotificationService] + NotificationService.subclasses
99   - notification_class = available_notification_classes.detect{|c| c.name == notification_type}
  99 + notification_class = available_notification_classes.detect { |c| c.name == notification_type }
100 100 if notification_class.present?
101 101 app.notification_service = notification_class.new(params[:app][:notification_service_attributes])
102 102 end
... ... @@ -116,7 +116,7 @@ protected
116 116 # Sanitize negative values, split on comma,
117 117 # strip, parse as integer, remove all '0's.
118 118 # If empty, set as default and show an error message.
119   - email_at_notices = val.gsub(/-\d+/, "").split(",").map{|v| v.strip.to_i }.reject{|v| v == 0}
  119 + email_at_notices = val.gsub(/-\d+/, "").split(",").map { |v| v.strip.to_i }.reject { |v| v == 0 }
120 120 if email_at_notices.any?
121 121 params[:app][:email_at_notices] = email_at_notices
122 122 else
... ... @@ -131,7 +131,7 @@ protected
131 131 # Sanitize negative values, split on comma,
132 132 # strip, parse as integer, remove all '0's.
133 133 # If empty, set as default and show an error message.
134   - notify_at_notices = val.gsub(/-\d+/, "").split(",").map{|v| v.strip.to_i }
  134 + notify_at_notices = val.gsub(/-\d+/, "").split(",").map { |v| v.strip.to_i }
135 135 if notify_at_notices.any?
136 136 params[:app][:notification_service_attributes][:notify_at_notices] = notify_at_notices
137 137 else
... ...
app/controllers/problems_searcher.rb
... ... @@ -13,7 +13,7 @@ module ProblemsSearcher
13 13 end
14 14 }
15 15  
16   - expose(:params_order){
  16 + expose(:params_order) {
17 17 unless %w{asc desc}.member?(params[:order])
18 18 'desc'
19 19 else
... ...
app/controllers/users_controller.rb
... ... @@ -65,7 +65,7 @@ protected
65 65 def user_permit_params
66 66 @user_permit_params ||= [:name, :username, :email, :github_login, :per_page, :time_zone]
67 67 @user_permit_params << :admin if current_user.admin? && current_user.id != params[:id]
68   - @user_permit_params |= [:password, :password_confirmation] if user_password_params.values.all?{|pa| !pa.blank? }
  68 + @user_permit_params |= [:password, :password_confirmation] if user_password_params.values.all? { |pa| !pa.blank? }
69 69 @user_permit_params
70 70 end
71 71  
... ...
app/helpers/application_helper.rb
... ... @@ -56,8 +56,8 @@ module ApplicationHelper
56 56 def create_percentage_table_from_tallies(tallies, options = {})
57 57 total = (options[:total] || total_from_tallies(tallies))
58 58 percent = 100.0 / total.to_f
59   - rows = tallies.map {|value, count| [(count.to_f * percent), value]}. \
60   - sort {|a, b| b[0] <=> a[0]}
  59 + rows = tallies.map { |value, count| [(count.to_f * percent), value] }. \
  60 + sort { |a, b| b[0] <=> a[0] }
61 61 render "problems/tally_table", :rows => rows
62 62 end
63 63  
... ...
app/helpers/apps_helper.rb
... ... @@ -4,8 +4,8 @@ module AppsHelper
4 4 html = link_to('copy settings from another app', '#',
5 5 :class => 'button copy_config')
6 6 html << select("duplicate", "app",
7   - App.all.asc(:name).reject{|a| a == @app }.
8   - collect{|p| [p.name, p.id] }, { :include_blank => "[choose app]" },
  7 + App.all.asc(:name).reject { |a| a == @app }.
  8 + collect { |p| [p.name, p.id] }, { :include_blank => "[choose app]" },
9 9 { :class => "choose_other_app", :style => "display: none;" })
10 10 return html
11 11 end
... ...
app/helpers/navigation_helper.rb
... ... @@ -19,7 +19,7 @@ module NavigationHelper
19 19 matches
20 20 when Array
21 21 s = {}
22   - matches.each {|c| s[c] = :all}
  22 + matches.each { |c| s[c] = :all }
23 23 s
24 24 else
25 25 { matches => :all }
... ...
app/interactors/problem_destroy.rb
... ... @@ -20,7 +20,7 @@ class ProblemDestroy
20 20 # the number of problem destroy
21 21 #
22 22 def self.execute(problems)
23   - Array(problems).each{ |problem|
  23 + Array(problems).each { |problem|
24 24 ProblemDestroy.new(problem).execute
25 25 }.count
26 26 end
... ...
app/models/app.rb
... ... @@ -21,7 +21,7 @@ class App
21 21 field :_id,
22 22 type: String,
23 23 pre_processed: true,
24   - default: ->{ BSON::ObjectId.new.to_s }
  24 + default: -> { BSON::ObjectId.new.to_s }
25 25  
26 26 embeds_many :watchers
27 27 embeds_many :deploys
... ...
app/models/deploy.rb
... ... @@ -19,7 +19,7 @@ class Deploy
19 19 validates_presence_of :username, :environment
20 20  
21 21 def resolve_app_errs
22   - app.problems.unresolved.in_env(environment).each {|problem| problem.resolve!}
  22 + app.problems.unresolved.in_env(environment).each { |problem| problem.resolve! }
23 23 end
24 24  
25 25 def short_revision
... ...
app/models/notice.rb
... ... @@ -26,8 +26,8 @@ class Notice
26 26  
27 27 validates_presence_of :backtrace_id, :server_environment, :notifier
28 28  
29   - scope :ordered, ->{ order_by(:created_at.asc) }
30   - scope :reverse_ordered, ->{ order_by(:created_at.desc) }
  29 + scope :ordered, -> { order_by(:created_at.asc) }
  30 + scope :reverse_ordered, -> { order_by(:created_at.desc) }
31 31 scope :for_errs, Proc.new { |errs|
32 32 where(:err_id.in => errs.all.map(&:id))
33 33 }
... ...
app/models/notification_services/campfire_service.rb
... ... @@ -17,7 +17,7 @@ if defined? Campy
17 17 ]
18 18  
19 19 def check_params
20   - if FIELDS.detect {|f| self[f[0]].blank? }
  20 + if FIELDS.detect { |f| self[f[0]].blank? }
21 21 errors.add :base, 'You must specify your Campfire Subdomain, API token and Room ID'
22 22 end
23 23 end
... ...
app/models/notification_services/hoiio_service.rb
... ... @@ -16,7 +16,7 @@ class NotificationServices::HoiioService &lt; NotificationService
16 16 ]
17 17  
18 18 def check_params
19   - if FIELDS.detect {|f| self[f[0]].blank? }
  19 + if FIELDS.detect { |f| self[f[0]].blank? }
20 20 errors.add :base, 'You must specify your App ID, Access Token and Recipient\'s phone numbers'
21 21 end
22 22 end
... ...
app/models/notification_services/hubot_service.rb
... ... @@ -12,7 +12,7 @@ class NotificationServices::HubotService &lt; NotificationService
12 12 ]
13 13  
14 14 def check_params
15   - if FIELDS.detect {|f| self[f[0]].blank? }
  15 + if FIELDS.detect { |f| self[f[0]].blank? }
16 16 errors.add :base, 'You must specify the URL of your hubot'
17 17 end
18 18 end
... ...
app/models/notification_services/pushover_service.rb
... ... @@ -12,7 +12,7 @@ class NotificationServices::PushoverService &lt; NotificationService
12 12 ]
13 13  
14 14 def check_params
15   - if FIELDS.detect {|f| self[f[0]].blank? }
  15 + if FIELDS.detect { |f| self[f[0]].blank? }
16 16 errors.add :base, 'You must specify your User Key and Application API Token.'
17 17 end
18 18 end
... ...
app/models/notification_services/slack_service.rb
... ... @@ -8,7 +8,7 @@ class NotificationServices::SlackService &lt; NotificationService
8 8 ]
9 9  
10 10 def check_params
11   - if FIELDS.detect {|f| self[f[0]].blank? }
  11 + if FIELDS.detect { |f| self[f[0]].blank? }
12 12 errors.add :base, "You must specify your Slack Hook url."
13 13 end
14 14 end
... ...
app/models/notification_services/webhook_service.rb
... ... @@ -8,7 +8,7 @@ class NotificationServices::WebhookService &lt; NotificationService
8 8 ]
9 9  
10 10 def check_params
11   - if FIELDS.detect {|f| self[f[0]].blank? }
  11 + if FIELDS.detect { |f| self[f[0]].blank? }
12 12 errors.add :base, 'You must specify the URL'
13 13 end
14 14 end
... ...
app/models/problem.rb
... ... @@ -58,10 +58,10 @@ class Problem
58 58 before_create :cache_app_attributes
59 59 before_save :truncate_message
60 60  
61   - scope :resolved, ->{ where(:resolved => true) }
62   - scope :unresolved, ->{ where(:resolved => false) }
63   - scope :ordered, ->{ order_by(:last_notice_at.desc) }
64   - scope :for_apps, lambda {|apps| where(:app_id.in => apps.all.map(&:id))}
  61 + scope :resolved, -> { where(:resolved => true) }
  62 + scope :unresolved, -> { where(:resolved => false) }
  63 + scope :ordered, -> { order_by(:last_notice_at.desc) }
  64 + scope :for_apps, lambda { |apps| where(:app_id.in => apps.all.map(&:id)) }
65 65  
66 66 validates_presence_of :last_notice_at, :first_notice_at
67 67  
... ...
lib/hoptoad/v2.rb
... ... @@ -22,13 +22,13 @@ module Hoptoad
22 22 elsif node.key?('key')
23 23 { normalize_key(node['key']) => nil }
24 24 else
25   - node.inject({}) {|rekeyed, (key, val)| rekeyed.merge(normalize_key(key) => rekey(val))}
  25 + node.inject({}) { |rekeyed, (key, val)| rekeyed.merge(normalize_key(key) => rekey(val)) }
26 26 end
27 27 when Array
28 28 if node.first.key?('key')
29   - node.inject({}) {|rekeyed, keypair| rekeyed.merge(rekey(keypair))}
  29 + node.inject({}) { |rekeyed, keypair| rekeyed.merge(rekey(keypair)) }
30 30 else
31   - node.map {|n| rekey(n)}
  31 + node.map { |n| rekey(n) }
32 32 end
33 33 else
34 34 node
... ...
spec/controllers/apps_controller_spec.rb
... ... @@ -61,7 +61,7 @@ describe AppsController, type: &#39;controller&#39; do
61 61  
62 62 it "should not raise errors for app with err without notices" do
63 63 err
64   - expect{ get :show, :id => app.id }.to_not raise_error
  64 + expect { get :show, :id => app.id }.to_not raise_error
65 65 end
66 66  
67 67 it "should list atom feed successfully" do
... ...
spec/controllers/comments_controller_spec.rb
... ... @@ -46,7 +46,7 @@ describe CommentsController, type: &#39;controller&#39; do
46 46 end
47 47  
48 48 it "should delete the comment" do
49   - expect(problem.comments.detect{|c| c.id.to_s == comment.id }).to be nil
  49 + expect(problem.comments.detect { |c| c.id.to_s == comment.id }).to be nil
50 50 end
51 51  
52 52 it "should redirect to problem page" do
... ...
spec/controllers/problems_controller_spec.rb
... ... @@ -326,7 +326,7 @@ describe ProblemsController, type: &#39;controller&#39; do
326 326 it "should unmerge a merged problem" do
327 327 merged_problem = Problem.merge!(@problem1, @problem2)
328 328 expect(merged_problem.errs.length).to eq 2
329   - expect{
  329 + expect {
330 330 post :unmerge_several, :problems => [merged_problem.id.to_s]
331 331 expect(merged_problem.reload.errs.length).to eq 1
332 332 }.to change(Problem, :count).by(1)
... ... @@ -370,7 +370,7 @@ describe ProblemsController, type: &#39;controller&#39; do
370 370  
371 371 context "POST /problems/destroy_several" do
372 372 it "should delete the problems" do
373   - expect{
  373 + expect {
374 374 post :destroy_several, :problems => [@problem1.id.to_s]
375 375 }.to change(Problem, :count).by(-1)
376 376 end
... ...
spec/controllers/watchers_controller_spec.rb
... ... @@ -20,7 +20,7 @@ describe WatchersController, type: &#39;controller&#39; do
20 20 end
21 21  
22 22 it "should delete the watcher" do
23   - expect(app.watchers.detect{|w| w.id.to_s == watcher.id }).to be nil
  23 + expect(app.watchers.detect { |w| w.id.to_s == watcher.id }).to be nil
24 24 end
25 25  
26 26 it "should redirect to app page" do
... ...
spec/fabricators/app_fabricator.rb
1 1 Fabricator(:app) do
2   - name { sequence(:app_name){|n| "App ##{n}"} }
  2 + name { sequence(:app_name) { |n| "App ##{n}" } }
3 3 repository_branch 'master'
4 4 end
5 5  
... ... @@ -12,7 +12,7 @@ end
12 12 Fabricator(:watcher) do
13 13 app
14 14 watcher_type 'email'
15   - email { sequence(:email){|n| "email#{n}@example.com"} }
  15 + email { sequence(:email) { |n| "email#{n}@example.com" } }
16 16 end
17 17  
18 18 Fabricator(:user_watcher, :from => :watcher) do
... ...
spec/fabricators/notice_fabricator.rb
... ... @@ -4,9 +4,9 @@ Fabricator :notice do
4 4 error_class 'FooError'
5 5 message 'Too Much Bar'
6 6 backtrace
7   - server_environment {{ 'environment-name' => 'production' }}
8   - request {{ 'component' => 'foo', 'action' => 'bar' }}
9   - notifier {{ 'name' => 'Notifier', 'version' => '1', 'url' => 'http://toad.com' }}
  7 + server_environment { { 'environment-name' => 'production' } }
  8 + request { { 'component' => 'foo', 'action' => 'bar' } }
  9 + notifier { { 'name' => 'Notifier', 'version' => '1', 'url' => 'http://toad.com' } }
10 10  
11 11 after_create do
12 12 Problem.cache_notice(err.problem_id, self)
... ...
spec/fabricators/notification_service_fabricator.rb
... ... @@ -3,7 +3,7 @@ Fabricator :notification_service do
3 3 room_id { sequence :word }
4 4 api_token { sequence :word }
5 5 subdomain { sequence :word }
6   - notify_at_notices { sequence { |_a| [0]} }
  6 + notify_at_notices { sequence { |_a| [0] } }
7 7 end
8 8  
9 9 Fabricator :gtalk_notification_service, :from => :notification_service, :class_name => "NotificationServices::GtalkService" do
... ...
spec/fabricators/sequences_fabricator.rb
1   -Fabricate.sequence(:name) {|n| "John #{n} Doe"}
2   -Fabricate.sequence(:word) {|n| "word#{n}"}
  1 +Fabricate.sequence(:name) { |n| "John #{n} Doe" }
  2 +Fabricate.sequence(:word) { |n| "word#{n}" }
... ...
spec/fabricators/user_fabricator.rb
1 1 Fabricator :user do
2 2 name 'Clyde Frog'
3   - email { sequence(:user_email) {|n| "user.#{n}@example.com"} }
  3 + email { sequence(:user_email) { |n| "user.#{n}@example.com" } }
4 4 password 'password'
5 5 password_confirmation 'password'
6 6 end
... ...
spec/interactors/problem_merge_spec.rb
... ... @@ -57,7 +57,7 @@ describe ProblemMerge do
57 57 it 'merge comment' do
58 58 expect {
59 59 problem_merge.merge
60   - }.to change{
  60 + }.to change {
61 61 problem.comments.size
62 62 }.from(1).to(2)
63 63 expect(comment_2.reload.err).to eq problem
... ...
spec/interactors/user_destroy_spec.rb
... ... @@ -17,7 +17,7 @@ describe UserDestroy do
17 17 it 'should delete watcher' do
18 18 expect {
19 19 UserDestroy.new(user).destroy
20   - }.to change{
  20 + }.to change {
21 21 app.reload.watchers.where(:user_id => user.id).count
22 22 }.from(1).to(0)
23 23 end
... ...
spec/mailers/mailer_spec.rb
... ... @@ -85,7 +85,7 @@ describe Mailer do
85 85 end
86 86  
87 87 context 'with a very long message' do
88   - let(:notice) { Fabricate(:notice, :message => 6.times.collect{|_a| "0123456789" }.join('')) }
  88 + let(:notice) { Fabricate(:notice, :message => 6.times.collect { |_a| "0123456789" }.join('')) }
89 89 it "should truncate the long message" do
90 90 expect(email.subject).to match(/ \d{47}\.{3}$/)
91 91 end
... ... @@ -99,7 +99,7 @@ describe Mailer do
99 99 let!(:notice) { Fabricate(:notice) }
100 100 let!(:comment) { Fabricate(:comment, :err => notice.problem) }
101 101 let!(:watcher) { Fabricate(:watcher, :app => comment.app) }
102   - let(:recipients) { ['recipient@example.com', 'another@example.com']}
  102 + let(:recipients) { ['recipient@example.com', 'another@example.com'] }
103 103  
104 104 before do
105 105 expect(comment).to receive(:notification_recipients).and_return(recipients)
... ...
spec/models/deploy_spec.rb
... ... @@ -17,20 +17,20 @@ describe Deploy, type: &#39;model&#39; do
17 17 context 'when the app has resolve_errs_on_deploy set to false' do
18 18 it 'should not resolve the apps errs' do
19 19 app = Fabricate(:app, :resolve_errs_on_deploy => false)
20   - @problems = 3.times.map{Fabricate(:err, :problem => Fabricate(:problem, :resolved => false, :app => app))}
  20 + @problems = 3.times.map { Fabricate(:err, :problem => Fabricate(:problem, :resolved => false, :app => app)) }
21 21 Fabricate(:deploy, :app => app)
22   - expect(app.reload.problems.none?{|problem| problem.resolved?}).to eq true
  22 + expect(app.reload.problems.none? { |problem| problem.resolved? }).to eq true
23 23 end
24 24 end
25 25  
26 26 context 'when the app has resolve_errs_on_deploy set to true' do
27 27 it 'should resolve the apps errs that were in the same environment' do
28 28 app = Fabricate(:app, :resolve_errs_on_deploy => true)
29   - @prod_errs = 3.times.map{Fabricate(:problem, :resolved => false, :app => app, :environment => 'production')}
30   - @staging_errs = 3.times.map{Fabricate(:problem, :resolved => false, :app => app, :environment => 'staging')}
  29 + @prod_errs = 3.times.map { Fabricate(:problem, :resolved => false, :app => app, :environment => 'production') }
  30 + @staging_errs = 3.times.map { Fabricate(:problem, :resolved => false, :app => app, :environment => 'staging') }
31 31 Fabricate(:deploy, :app => app, :environment => 'production')
32   - expect(@prod_errs.all?{|problem| problem.reload.resolved?}).to eq true
33   - expect(@staging_errs.all?{|problem| problem.reload.resolved?}).to eq false
  32 + expect(@prod_errs.all? { |problem| problem.reload.resolved? }).to eq true
  33 + expect(@staging_errs.all? { |problem| problem.reload.resolved? }).to eq false
34 34 end
35 35 end
36 36 end
... ...
spec/models/error_report_spec.rb
... ... @@ -17,7 +17,7 @@ module Airbrake
17 17 end
18 18  
19 19 describe ErrorReport do
20   - let(:xml){
  20 + let(:xml) {
21 21 Rails.root.join('spec', 'fixtures', 'hoptoad_test_notice.xml').read
22 22 }
23 23  
... ... @@ -52,7 +52,7 @@ describe ErrorReport do
52 52 end
53 53  
54 54 context "with a minimal notice" do
55   - let(:xml){
  55 + let(:xml) {
56 56 Rails.root.join('spec', 'fixtures', 'minimal_test_notice.xml').read
57 57 }
58 58  
... ... @@ -237,7 +237,7 @@ describe ErrorReport do
237 237 end
238 238  
239 239 context "with xml without request section" do
240   - let(:xml){
  240 + let(:xml) {
241 241 Rails.root.join('spec', 'fixtures', 'hoptoad_test_notice_without_request_section.xml').read
242 242 }
243 243 it "save a notice" do
... ... @@ -250,7 +250,7 @@ describe ErrorReport do
250 250 end
251 251  
252 252 context "with xml with only a single line of backtrace" do
253   - let(:xml){
  253 + let(:xml) {
254 254 Rails.root.join('spec', 'fixtures', 'hoptoad_test_notice_with_one_line_of_backtrace.xml').read
255 255 }
256 256 it "save a notice" do
... ...
spec/models/notice_observer_spec.rb
... ... @@ -102,7 +102,7 @@ describe &quot;Callback on Notice&quot;, type: &#39;model&#39; do
102 102 end
103 103  
104 104 describe 'send email when notification service is configured but fails' do
105   - let(:notification_service) {Fabricate(:campfire_notification_service)}
  105 + let(:notification_service) { Fabricate(:campfire_notification_service) }
106 106 let(:app) do
107 107 Fabricate(
108 108 :app_with_watcher,
... ... @@ -130,7 +130,7 @@ describe &quot;Callback on Notice&quot;, type: &#39;model&#39; do
130 130 describe 'should not send a notification if a notification service is not' \
131 131 'configured' do
132 132 let(:notification_service) { Fabricate(:notification_service) }
133   - let(:app) { Fabricate(:app, notification_service: notification_service)}
  133 + let(:app) { Fabricate(:app, notification_service: notification_service) }
134 134 let(:notice_attrs) { notice_attrs_for.call(app.api_key) }
135 135  
136 136 before { Errbit::Config.per_app_notify_at_notices = true }
... ...
spec/models/problem_spec.rb
... ... @@ -10,7 +10,7 @@ describe Problem, type: &#39;model&#39; do
10 10 describe "Fabrication" do
11 11 context "Fabricate(:problem)" do
12 12 it 'should have no comment' do
13   - expect{
  13 + expect {
14 14 Fabricate(:problem)
15 15 }.to_not change(Comment, :count)
16 16 end
... ... @@ -18,7 +18,7 @@ describe Problem, type: &#39;model&#39; do
18 18  
19 19 context "Fabricate(:problem_with_comments)" do
20 20 it 'should have 3 comments' do
21   - expect{
  21 + expect {
22 22 Fabricate(:problem_with_comments)
23 23 }.to change(Comment, :count).by(3)
24 24 end
... ... @@ -26,7 +26,7 @@ describe Problem, type: &#39;model&#39; do
26 26  
27 27 context "Fabricate(:problem_with_errs)" do
28 28 it 'should have 3 errs' do
29   - expect{
  29 + expect {
30 30 Fabricate(:problem_with_errs)
31 31 }.to change(Err, :count).by(3)
32 32 end
... ... @@ -280,7 +280,7 @@ describe Problem, type: &#39;model&#39; do
280 280 Fabricate(:notice, :err => @err, :message => 'ERR 1')
281 281 @problem.messages = {}
282 282 @problem.save!
283   - expect {@err.notices.first.destroy}.not_to raise_error
  283 + expect { @err.notices.first.destroy }.not_to raise_error
284 284 end
285 285 end
286 286  
... ... @@ -412,7 +412,7 @@ describe Problem, type: &#39;model&#39; do
412 412 it 'update the notice_count' do
413 413 expect {
414 414 problem.recache
415   - }.to change{
  415 + }.to change {
416 416 problem.notices_count
417 417 }.from(0).to(1)
418 418 end
... ...
spec/spec_helper.rb
... ... @@ -30,7 +30,7 @@ require &#39;errbit_plugin/mock_issue_tracker&#39;
30 30  
31 31 # Requires supporting files with custom matchers and macros, etc,
32 32 # in ./support/ and its subdirectories.
33   -Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
  33 +Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
34 34 Mongoid::Config.truncate!
35 35 Mongoid::Tasks::Database.create_indexes
36 36 ActionMailer::Base.delivery_method = :test
... ...
spec/views/problems/show.html.haml_spec.rb
... ... @@ -113,7 +113,7 @@ describe &quot;problems/show.html.haml&quot;, type: &#39;view&#39; do
113 113 end
114 114  
115 115 context "without issue tracker associate on app" do
116   - let(:problem){ Problem.new(:new_record => false, :app => app) }
  116 + let(:problem) { Problem.new(:new_record => false, :app => app) }
117 117 let(:app) { App.new(:new_record => false) }
118 118  
119 119 it 'not see link to create issue' do
... ... @@ -129,7 +129,7 @@ describe &quot;problems/show.html.haml&quot;, type: &#39;view&#39; do
129 129  
130 130 context "with app having github_repo" do
131 131 let(:app) { App.new(:new_record => false, :github_repo => 'foo/bar') }
132   - let(:problem){ Problem.new(:new_record => false, :app => app) }
  132 + let(:problem) { Problem.new(:new_record => false, :app => app) }
133 133  
134 134 before do
135 135 problem.issue_link = nil
... ...