spec/configurators/ruby_configurator_spec.rb in rconf-1.0.7 vs spec/configurators/ruby_configurator_spec.rb in rconf-1.0.8

- old
+ new

@@ -31,11 +31,13 @@ end context "with rbenv installed" do before(:each) do should_execute('rvm').once.and_return(failure_result) + flexmock(File).should_receive(:exist?).with(File.join(ENV['HOME'], '.rbenv', 'bin', 'rbenv')).and_return(true) should_execute('rbenv', 'local', '42').and_return(success_result) + should_execute('which', 'ruby').and_return(success_result(File.join(ENV['HOME'], '.rbenv', 'shims', 'ruby'))) end it 'should succeed' do should_execute('rbenv').once.and_return(success_result('rbenv 0.4.0')) @configurator.run_linux @@ -51,9 +53,10 @@ context "without rbenv installed" do before(:each) do should_execute('rvm').once.and_return(failure_result) should_execute('rbenv').once.and_return(failure_result) flexmock(File).should_receive(:exist?).with(File.join(ENV['HOME'], '.rbenv', 'bin', 'rbenv')).and_return(false) + should_execute('which', 'ruby').and_return(success_result(File.join(ENV['HOME'], '.rbenv', 'shims', 'ruby'))) end it 'should install rbenv and ruby-build' do flexmock(RightConf::PackageInstaller).should_receive(:install).with('rbenv', Hash).once flexmock(RightConf::PackageInstaller).should_receive(:install).with('ruby-build', Hash).once