spec/configurators/ruby_configurator_spec.rb in rconf-0.5.3 vs spec/configurators/ruby_configurator_spec.rb in rconf-0.5.5
- old
+ new
@@ -16,11 +16,11 @@
def success_result(output=nil)
flexmock('res', :success? => true, :output => output)
end
before(:each) do
- lang = RightConf::Language.parse('ruby { ruby_version "0"; rubygems_version "1" }')
+ lang = RightConf::Language.parse('ruby { version "0"; rubygems "1" }')
@configurator = lang.configurators.first
[:report_check, :report_result, :report_fatal, :report_success, :report].each do |meth|
flexmock(@configurator).should_receive(meth)
end
end
@@ -44,10 +44,11 @@
flexmock(RightConf::Command.instance).should_receive(:execute).once.with(
'curl', '-O', '-f',
"http://rvm.beginrescueend.com/releases/#{rvm_tar}",
{:abort_on_failure=>"Failed to download rvm #{RightConf::RubyConfigurator::RVM_VERSION}"}).and_return(success_result)
flexmock(RightConf::Command.instance).should_receive(:execute).once.with(
- 'tar', 'zxf', rvm_tar).and_return(success_result)
+ 'tar', 'zxf', rvm_tar,
+ {:abort_on_failure=>"Failed to extract rvm tgz from /Users/raphael/src/right_env/rvm-1.2.6.tar.gz"}).and_return(success_result)
flexmock(Dir).should_receive(:chdir).and_yield
flexmock(RightConf::Command.instance).should_receive(:execute).once.with(
'./install', {:abort_on_failure=>"Failed to install rvm #{RightConf::RubyConfigurator::RVM_VERSION}"}).and_return(success_result)
flexmock(RightConf::Command.instance).should_receive(:execute).once.with(
'rvm', 'use', '0').and_return(success_result('Using'))