1
1
package com.github.jrubygradle
2
2
3
3
import org.gradle.testfixtures.ProjectBuilder
4
+ import org.junit.Ignore
4
5
import spock.lang.*
5
6
import static org.gradle.api.logging.LogLevel.LIFECYCLE
6
7
@@ -23,33 +24,39 @@ class JRubyPluginIntegrationSpec extends Specification {
23
24
project. apply plugin : ' com.github.jruby-gradle.base'
24
25
}
25
26
26
- @IgnoreIf ({TESTS_ARE_OFFLINE })
27
- def " jrubyWar task needs to add jruby-complete jar" () {
28
- given : " That we have a test version that is different that the compiled-in defaultVersion"
29
- final String useVersion = ' 1.7.3'
30
- assert useVersion != project. jruby. defaultVersion
31
- new File (TESTROOT ,' libs' ). mkdirs()
32
- new File (TESTROOT ,' classes/main' ). mkdirs()
33
-
34
- when : " We change the default version and the rubyWar task is executed (via copy)"
35
- project. jruby {
36
- defaultVersion useVersion
37
- }
38
- def jrw = project. tasks. jrubyWar
39
- project. evaluate()
40
- jrw. copy()
41
- def jar = project. configurations. jrubyWar. files. find { it. toString(). find(' jruby-complete' ) }
42
- def jarMatch = (jar != null ) ? (jar =~ / .*(jruby-complete-.+.jar)/ ) : jar
43
-
44
- then : " We expect the task to have completed succesfully"
45
- jrw. outputs. files. singleFile. exists()
46
-
47
- and : " We expect to have a jruby-complete-XXX.jar"
48
- jar != null
49
-
50
- and : " jruby-complete-XXX.jar must match ${ useVersion} "
51
- jarMatch != null
52
- " jruby-complete-${ useVersion} .jar" . toString() == jarMatch[0 ][1 ]
27
+ @Ignore
28
+ def " dummy test - need to decide what to do with jrubywar test" () {
29
+ expect :
30
+ true
53
31
}
32
+ // @IgnoreIf({TESTS_ARE_OFFLINE})
33
+ // @Ignore
34
+ // def "jrubyWar task needs to add jruby-complete jar"() {
35
+ // given: "That we have a test version that is different that the compiled-in defaultVersion"
36
+ // final String useVersion = '1.7.3'
37
+ // assert useVersion != project.jruby.defaultVersion
38
+ // new File(TESTROOT,'libs').mkdirs()
39
+ // new File(TESTROOT,'classes/main').mkdirs()
40
+ //
41
+ // when: "We change the default version and the rubyWar task is executed (via copy)"
42
+ // project.jruby {
43
+ // defaultVersion useVersion
44
+ // }
45
+ // def jrw = project.tasks.jrubyWar
46
+ // project.evaluate()
47
+ // jrw.copy()
48
+ // def jar = project.configurations.jrubyWar.files.find { it.toString().find('jruby-complete') }
49
+ // def jarMatch = (jar !=null) ? (jar =~ /.*(jruby-complete-.+.jar)/) : jar
50
+ //
51
+ // then: "We expect the task to have completed succesfully"
52
+ // jrw.outputs.files.singleFile.exists()
53
+ //
54
+ // and: "We expect to have a jruby-complete-XXX.jar"
55
+ // jar != null
56
+ //
57
+ // and: "jruby-complete-XXX.jar must match ${useVersion}"
58
+ // jarMatch != null
59
+ // "jruby-complete-${useVersion}.jar".toString() == jarMatch[0][1]
60
+ // }
54
61
}
55
62
0 commit comments