Skip to content
This repository was archived by the owner on Oct 5, 2023. It is now read-only.

Commit

Permalink
fakerubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Walbran committed Feb 17, 2016
1 parent 07418ad commit 4596bd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/socialcast-git-extensions/git.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def changelog_summary(branch)
end
dir_counts = Hash.new(0)
dirs.each { |dir| dir_counts[dir] += 1 }
changes = dir_counts.to_a.sort_by { |k,v| [-v, k] }.first(5).map { |k,v| "#{k} (#{v} file#{'s' if v > 1})" }
changes = dir_counts.to_a.sort_by { |k, v| [-v, k] }.first(5).map { |k, v| "#{k} (#{v} file#{'s' if v > 1})" }
else
changes = changes.map do |line|
added, removed, filename = line.split
Expand Down
6 changes: 3 additions & 3 deletions spec/cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def stub_message(message_body, params = {})
end
context 'with one branch-name argument' do
let(:args) { ['my-branch'] }
before do
before do
expect_any_instance_of(Socialcast::Gitx::CLI).to receive(:branch_difference).with('my-branch', 'master').and_return(['dummy_branch'])
branchdiff
end
Expand All @@ -386,7 +386,7 @@ def stub_message(message_body, params = {})
end
context 'with two branch-name arguments' do
let(:args) { ['my-branch', 'other-branch'] }
before do
before do
expect_any_instance_of(Socialcast::Gitx::CLI).to receive(:branch_difference).with('my-branch', 'other-branch').and_return(['dummy_branch'])
branchdiff
end
Expand All @@ -396,7 +396,7 @@ def stub_message(message_body, params = {})
end
context 'when no results are found' do
let(:args) { ['my-branch'] }
before do
before do
expect_any_instance_of(Socialcast::Gitx::CLI).to receive(:branch_difference).with('my-branch', 'master').and_return([])
branchdiff
end
Expand Down

0 comments on commit 4596bd9

Please sign in to comment.