Skip to content

Commit

Permalink
do not assume gem order in (osgi) embed test
Browse files Browse the repository at this point in the history
  • Loading branch information
kares committed Jul 24, 2015
1 parent e88911e commit f186719
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ public void testJRubyCreate() throws Exception {
assertEquals(true, loaded);

jruby.runScriptlet( "require 'jar-dependencies'" );
list = (String) jruby.runScriptlet( "Gem.loaded_specs.keys.inspect" );
assertEquals(list, "[\"rake\", \"jruby-openssl\", \"jar-dependencies\"]");
list = (String) jruby.runScriptlet( "Gem.loaded_specs.keys.sort.inspect" );
assertEquals(list, "[\"jar-dependencies\", \"jruby-openssl\", \"rake\"]");

// ensure we can load can load embedded gems
loaded = (Boolean) jruby.runScriptlet( "require 'virtus'" );
assertEquals(true, loaded);

list = (String) jruby.runScriptlet( "Gem.loaded_specs.keys.inspect" );
assertEquals(list, "[\"rake\", \"jruby-openssl\", \"jar-dependencies\", \"thread_safe\", \"descendants_tracker\", \"equalizer\", \"coercible\", \"ice_nine\", \"axiom-types\", \"virtus\"]");
list = (String) jruby.runScriptlet( "Gem.loaded_specs.keys.sort.inspect" );
assertEquals(list, "[\"axiom-types\", \"coercible\", \"descendants_tracker\", \"equalizer\", \"ice_nine\", \"jar-dependencies\", \"jruby-openssl\", \"rake\", \"thread_safe\", \"virtus\"]");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ public void testJRubyCreate() throws InterruptedException {
assertEquals( gemPath, "[\"uri:classloader:/specifications\", \"uri:classloader://specifications\"]" );

jruby.runScriptlet( "require 'jar-dependencies'" );
list = (String) jruby.runScriptlet( "Gem.loaded_specs.keys.inspect" );
assertEquals(list, "[\"rake\", \"jruby-openssl\", \"jar-dependencies\"]");
list = (String) jruby.runScriptlet( "Gem.loaded_specs.keys.sort.inspect" );
assertEquals(list, "[\"jar-dependencies\", \"jruby-openssl\", \"rake\"]");

// ensure we can load can load embedded gems
loaded = (Boolean) jruby.runScriptlet( "require 'virtus'" );
assertEquals(true, loaded);

list = (String) jruby.runScriptlet( "Gem.loaded_specs.keys.inspect" );
assertEquals(list, "[\"rake\", \"jruby-openssl\", \"jar-dependencies\", \"thread_safe\", \"descendants_tracker\", \"equalizer\", \"coercible\", \"ice_nine\", \"axiom-types\", \"virtus\"]");
list = (String) jruby.runScriptlet( "Gem.loaded_specs.keys.sort.inspect" );
assertEquals(list, "[\"axiom-types\", \"coercible\", \"descendants_tracker\", \"equalizer\", \"ice_nine\", \"jar-dependencies\", \"jruby-openssl\", \"rake\", \"thread_safe\", \"virtus\"]");
}
}

0 comments on commit f186719

Please sign in to comment.