Created
August 19, 2011 01:50
-
-
Save akiellor/1155811 to your computer and use it in GitHub Desktop.
Gradle which supports rspec :-)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'java' | |
apply plugin: 'groovy' | |
apply plugin: 'eclipse' | |
import org.rubygems.repository.GemResolver; | |
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath group: 'org.jruby', name: 'jruby-complete', version: '1.6.3' | |
} | |
} | |
configurations { gem } | |
dependencies { | |
gem name: "rspec", version: "2.6.0" | |
} | |
repositories { | |
mavenCentral() | |
add(new GemResolver(buildscript.configurations.classpath.asPath, file(".gems"))); | |
} | |
task(spec, dependsOn: ["classes", "testClasses"], type: JavaExec) { | |
configurations.gem.asPath | |
main = 'org.jruby.Main' | |
classpath = sourceSets.test.runtimeClasspath + buildscript.configurations.classpath | |
args = ['-S', 'rspec', 'src/spec/ruby'] | |
println file(".gems").path | |
environment['GEM_HOME'] = file(".gems").path | |
environment['GEM_PATH'] = file(".gems").path | |
environment['PATH'] = file(".gems/bin").path + ":" + environment['PATH'] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'java' | |
require 'rspec' | |
describe "a stack" do | |
subject { java.util.Stack.new } | |
it { should be_empty } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Q: Where does the import org.rubygems.repository.GemResolver reside?
Can't seem to resolve it.