Skip to content

Commit

Permalink
Update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
leruaa committed Nov 29, 2017
1 parent ffcacfe commit 7450ea9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ import spock.lang.Specification
class FbxConvTest extends Specification {

def "convert FBX to G3DJ"() {
def result = new File("src/test/resources/cube.g3dj")

result.delete()

when:
GradleRunner.create()
.withProjectDir(new File(""))
.withProjectDir(new File("src/test/resources"))
.withArguments("testFbxConv", "--stacktrace", "--rerun-tasks")
.build();
.build()

then:
new File("cube.g3dj").exists()
result.exists()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ import spock.lang.Specification
class RenderImageTest extends Specification {

void "render an image"() {
def result = new File("src/test/resources/cube.png")

result.delete()

when:
GradleRunner.create()
.withProjectDir(new File(""))
.withProjectDir(new File("src/test/resources"))
.withArguments("testRenderImage", "--stacktrace", "--rerun-tasks")
.build();
.build()

then:
new File("cube.png").exists()
result.exists()
}
}
2 changes: 1 addition & 1 deletion src/test/resources/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ buildscript {
mavenLocal()
}
dependencies {
classpath 'com.eowise:blender:0.5.0'
classpath 'com.eowise:blender:0.5.2'
}
}

Expand Down

0 comments on commit 7450ea9

Please sign in to comment.