File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
src/test/java/org/truffleruby Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,21 @@ public void testNativeNoThreads() throws Throwable {
38
38
}
39
39
}
40
40
41
+ @ Test
42
+ public void testRequireGem () {
43
+ // TODO (eregon, 4 Feb 2019): This should run on GraalVM, not development jars
44
+ String home = System .getProperty ("user.dir" ) + "/mxbuild/truffleruby-jvm/jre/languages/ruby" ;
45
+ try (Context context = Context .newBuilder ("ruby" )
46
+ .allowIO (true )
47
+ .allowNativeAccess (true )
48
+ .allowExperimentalOptions (true )
49
+ .option ("ruby.home" , home )
50
+ .build ()) {
51
+ // NOTE: rake is a bundled gem, so it needs RubyGems to be required
52
+ Assert .assertEquals ("Rake" , context .eval ("ruby" , "require 'rake'; Rake.to_s" ).asString ());
53
+ }
54
+ }
55
+
41
56
@ Test
42
57
public void testThreadsNoNative () throws Throwable {
43
58
// The ruby.single_threaded option needs to be set because --single-threaded defaults to --embedded.
You can’t perform that action at this time.
0 commit comments