Skip to content

Commit

Permalink
Refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
3750 committed Nov 15, 2023
1 parent ad7ecf3 commit ee7fa1c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ class RemoveFileSpec extends BaseSpec {
def dirName = "test 2"
def file = new File(rootDir, dirName)
file.mkdir()
def filesBeforeRemove = rootDir.list()
def numberOfFilesBeforeRemove = rootDir.list().length

when:
FileService.removeFile(rootDir, dirName)


then:
def filesAfterRemove = rootDir.list()
filesAfterRemove.length == filesBeforeRemove.length - 1
filesAfterRemove.length == numberOfFilesBeforeRemove - 1
}

}

0 comments on commit ee7fa1c

Please sign in to comment.