diff options
author | Paco Guzman <pacoguzmanp@gmail.com> | 2016-07-26 10:21:42 +0300 |
---|---|---|
committer | Paco Guzman <pacoguzmanp@gmail.com> | 2016-08-03 08:00:20 +0300 |
commit | 8f359ea9170b984ad43d126e17628c31ac3a1f14 (patch) | |
tree | ee47d5172537ddedabc2cc38ef3cb5bf966c89ee /spec/controllers/projects/commit_controller_spec.rb | |
parent | cd7c2cb6ddd4d9c9f9bdae00c887c0022c121c17 (diff) |
Move to Gitlab::Diff::FileCollection
Instead calling diff_collection.count use diff_collection.size which is cache on the diff_collection
Diffstat (limited to 'spec/controllers/projects/commit_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/commit_controller_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/controllers/projects/commit_controller_spec.rb b/spec/controllers/projects/commit_controller_spec.rb index 30121facd7d..940019b708b 100644 --- a/spec/controllers/projects/commit_controller_spec.rb +++ b/spec/controllers/projects/commit_controller_spec.rb @@ -267,9 +267,9 @@ describe Projects::CommitController do end it 'only renders the diffs for the path given' do - expect(controller).to receive(:render_diff_for_path).and_wrap_original do |meth, safe_diffs| - expect(safe_diffs.diff_files.map(&:new_path)).to contain_exactly(existing_path) - meth.call(safe_diffs) + expect(controller).to receive(:render_diff_for_path).and_wrap_original do |meth, diffs| + expect(diffs.diff_files.map(&:new_path)).to contain_exactly(existing_path) + meth.call(diffs) end diff_for_path(id: commit.id, old_path: existing_path, new_path: existing_path) |