@@ -27,17 +27,24 @@ class GitClientImplTest {
2727 workingDir = workingDir,
2828 logger = logger,
2929 commandRunner = commandRunner,
30- commitShaProvider = commitShaProvider
30+ commitShaProvider = commitShaProvider,
31+ ignoredFiles = setOf (" .*\\ .ignore" , " .*IGNORED_FILE" )
3132 )
3233
3334 @Test
3435 fun givenChangedFiles_whenFindChangedFilesIncludeUncommitted_thenReturnChanges () {
3536 val changes = listOf (
37+ convertToFilePath(" d" , " e" , " .ignoredNot" ),
3638 convertToFilePath(" a" , " b" , " c.java" ),
3739 convertToFilePath(" d" , " e" , " f.java" ))
40+ val changesWithIgnores = listOf (
41+ convertToFilePath(" a" , " b" , " anything.ignore" ),
42+ convertToFilePath(" d" , " e" , " .ignore" ),
43+ convertToFilePath(" d" , " e" , " IGNORED_FILE" )
44+ ) + changes
3845 commandRunner.addReply(
3946 " $CHANGED_FILES_CMD_PREFIX mySha" ,
40- changes .joinToString(System .lineSeparator())
47+ changesWithIgnores .joinToString(System .lineSeparator())
4148 )
4249 commitShaProvider.addReply(" mySha" )
4350
@@ -58,11 +65,17 @@ class GitClientImplTest {
5865 @Test
5966 fun findChangesSince_twoCls () {
6067 val changes = listOf (
68+ convertToFilePath(" d" , " e" , " .ignoredNot" ),
6169 convertToFilePath(" a" , " b" , " c.java" ),
6270 convertToFilePath(" d" , " e" , " f.java" ))
71+ val changesWithIgnores = listOf (
72+ convertToFilePath(" a" , " b" , " anything.ignore" ),
73+ convertToFilePath(" d" , " e" , " .ignore" ),
74+ convertToFilePath(" d" , " e" , " IGNORED_FILE" )
75+ ) + changes
6376 commandRunner.addReply(
6477 " $CHANGED_FILES_CMD_PREFIX otherSha..mySha" ,
65- changes .joinToString(System .lineSeparator())
78+ changesWithIgnores .joinToString(System .lineSeparator())
6679 )
6780 commitShaProvider.addReply(" mySha" )
6881 assertEquals(
0 commit comments