diff --git a/spec/unit/puppet/type/rvm_system_ruby_spec.rb b/spec/unit/puppet/type/rvm_system_ruby_spec.rb index 6f8b22c8..b701ace5 100644 --- a/spec/unit/puppet/type/rvm_system_ruby_spec.rb +++ b/spec/unit/puppet/type/rvm_system_ruby_spec.rb @@ -4,6 +4,10 @@ describe Puppet::Type.type(:rvm_system_ruby) do context 'with autolib_mode set' do + let(:system_ruby) do + Puppet::Type.type(:rvm_system_ruby).new(name: 'jruby-1.7.6', autolib_mode: 'read-fail') + end + it 'does not raise error' do expect do Puppet::Type.type(:rvm_system_ruby).new(name: 'ruby-1.9.3-p448', autolib_mode: 'enabled') @@ -11,8 +15,7 @@ end it 'sets mode correctly' do - @system_ruby = Puppet::Type.type(:rvm_system_ruby).new(name: 'jruby-1.7.6', autolib_mode: 'read-fail') - expect(@system_ruby[:autolib_mode]).to eq('read-fail') + expect(system_ruby[:autolib_mode]).to eq('read-fail') end end