Skip to content

Commit

Permalink
[frontend] Manually fix Lint/AmbiguousBlockAssociation offense
Browse files Browse the repository at this point in the history
Mob-programming with @DavidKang
  • Loading branch information
bgeuken committed Dec 14, 2017
1 parent dcd5d83 commit f76c85d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
6 changes: 0 additions & 6 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ Layout/MultilineMethodCallIndentation:
Layout/MultilineOperationIndentation:
Enabled: false

# Offense count: 3
Lint/AmbiguousBlockAssociation:
Exclude:
- 'src/api/spec/controllers/webui/project_controller_spec.rb'
- 'src/api/spec/models/comment_spec.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleAlignWith, SupportedStylesAlignWith.
Expand Down
4 changes: 2 additions & 2 deletions src/api/spec/controllers/webui/project_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,7 @@
context 'elements position' do
it { expect { move }.to change { path_elements[0].reload.position }.by(1) }
it { expect { move }.to change { path_elements[1].reload.position }.by(-1) }
it { expect { move }.not_to change { path_elements[2].reload.position } }
it { expect { move }.not_to(change { path_elements[2].reload.position }) }
end
end

Expand All @@ -1359,7 +1359,7 @@
end

context 'elements position' do
it { expect { move }.not_to change { path_elements[0].reload.position } }
it { expect { move }.not_to(change { path_elements[0].reload.position }) }
it { expect { move }.to change { path_elements[1].reload.position }.by(1) }
it { expect { move }.to change { path_elements[2].reload.position }.by(-1) }
end
Expand Down
2 changes: 1 addition & 1 deletion src/api/spec/models/comment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
end

it "shouldn't be destroyed" do
expect { comment_package.blank_or_destroy }.to_not change { Comment.count }
expect { comment_package.blank_or_destroy }.to_not(change { Comment.count })
expect(comment_package.body).to eq 'This comment has been deleted'
expect(comment_package.user.login).to eq '_nobody_'
end
Expand Down

0 comments on commit f76c85d

Please sign in to comment.