spec/aruba/jruby_spec.rb in aruba-0.5.4 vs spec/aruba/jruby_spec.rb in aruba-0.6.0
- old
+ new
@@ -22,10 +22,13 @@
end
end
it 'configuration loads for java and merges existing environment variables' do
with_constants :ENV => @fake_env, :RUBY_PLATFORM => 'java' do
- RbConfig::CONFIG.stub(:[] => 'solaris')
+ rb_config = double('rb_config')
+ allow(rb_config).to receive(:[]).and_return('solaris')
+ stub_const 'RbConfig::CONFIG', rb_config
+
load 'aruba/jruby.rb'
Aruba.config.hooks.execute :before_cmd, self
expect(ENV['JRUBY_OPTS']).to eq "-X-C --1.9"
expect(ENV['JAVA_OPTS']).to eq "-d32 -Xdebug"
end