Skip to content

Commit

Permalink
Updated the specifications for the changed files
Browse files Browse the repository at this point in the history
  • Loading branch information
mikechernev committed Aug 17, 2015
1 parent 6373963 commit 8d5eb13
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spec/GrumPHP/Locator/ChangedFilesSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Gitonomy\Git\Diff\Diff;
use Gitonomy\Git\Diff\File;
use Gitonomy\Git\WorkingCopy;
use Gitonomy\Git\Repository;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
Expand Down Expand Up @@ -37,13 +38,14 @@ protected function mockFile($name, $isRename = false, $isDelete = false)
return $file->reveal();
}

function it_will_list_all_diffed_files(Repository $repository, Diff $diff)
function it_will_list_all_diffed_files(Repository $repository, Diff $diff, WorkingCopy $workingCopy)
{
$changedFile = $this->mockFile('file1.txt');
$movedFile = $this->mockFile('file2.txt', true);
$deletedFile = $this->mockFile('file3.txt', false, true);

$repository->getDiff('HEAD')->willReturn($diff);
$repository->getWorkingCopy()->willReturn($workingCopy);
$workingCopy->getDiffStaged()->willReturn($diff);
$diff->getFiles()->willReturn(array($changedFile, $movedFile, $deletedFile));

$result = $this->locate();
Expand Down

0 comments on commit 8d5eb13

Please sign in to comment.