spec/configurators/ruby_configurator_spec.rb in rconf-0.9.17 vs spec/configurators/ruby_configurator_spec.rb in rconf-0.9.18
- old
+ new
@@ -27,30 +27,30 @@
end
it 'should succeed on linux when rvm succeeds' do
should_execute('rvm', '--version').once.and_return(success_result("rvm #{RVM_VERSION}"))
should_execute('rvm', 'current').once.and_return(success_result("0@"))
- should_execute('rvm', '0@', 'gem', '--version').once.and_return(success_result('1'))
+ should_execute('rvm', '0@', 'exec', '--', 'gem', '--version').once.and_return(success_result('1'))
@configurator.run_linux
end
it 'should install rvm if needed' do
- rvm_tar = "rvm-#{RVM_VERSION}.tar.gz"
+ rvm_tar = "rvm-#{RVM_VERSION}.tar.gz"
should_execute('rvm', '--version').once.and_return(success_result("rvm"))
should_execute('curl', '-O', '-f', "https://rvm.beginrescueend.com/releases/#{rvm_tar}",
{:abort_on_failure=>"Failed to download rvm #{RVM_VERSION}"}).once.and_return(success_result)
- should_execute('tar', 'zxf', rvm_tar,
+ should_execute('tar', 'zxf', rvm_tar,
{:abort_on_failure=>"Failed to extract rvm tgz from #{File.expand_path(File.join(File.dirname(__FILE__), '..', '..', "rvm-#{RVM_VERSION}.tar.gz"))}"}).once.and_return(success_result)
flexmock(Dir).should_receive(:chdir).and_yield
should_execute('./install', {:abort_on_failure=>"Failed to install rvm #{RVM_VERSION}"}).once.and_return(success_result)
should_execute('rvm', 'use', '0').never
@configurator.run_linux
end
it 'should install rubygems if needed' do
should_execute('rvm', '--version').once.and_return(success_result("rvm #{RVM_VERSION}"))
should_execute('rvm', 'current').once.and_return(success_result("0@"))
- should_execute('rvm', '0@', 'gem', '--version').once.and_return(success_result('0'))
+ should_execute('rvm', '0@', 'exec', '--', 'gem', '--version').once.and_return(success_result('0'))
should_execute('rvm', '0@', 'rubygems', '1',
{:abort_on_failure=>'Failed to install rubygems'}).once.and_return(success_result)
@configurator.run_linux
end
end