spec/configurators/ruby_configurator_spec.rb in rconf-1.0.1 vs spec/configurators/ruby_configurator_spec.rb in rconf-1.0.3

- old
+ new

@@ -31,12 +31,11 @@ end context "with rbenv installed" do before(:each) do should_execute('rvm').once.and_return(failure_result) - flexmock(File).should_receive(:exist?).with('.ruby-version').and_return(true) - flexmock(IO).should_receive(:read).with('.ruby-version').and_return("42") + should_execute('rbenv', 'local', '42').and_return(success_result) end it 'should succeed' do should_execute('rbenv').once.and_return(success_result('rbenv 0.4.0')) @configurator.run_linux @@ -51,10 +50,9 @@ 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('.ruby-version').and_return(false) flexmock(File).should_receive(:exist?).with(File.join(ENV['HOME'], '.rbenv', 'bin', 'rbenv')).and_return(false) end it 'should install rbenv and ruby-build' do flexmock(RightConf::PackageInstaller).should_receive(:install).with('rbenv', Hash).once