spec/profile_spec.rb in rconf-0.8.21 vs spec/profile_spec.rb in rconf-0.8.29

- old
+ new

@@ -1,6 +1,6 @@ -# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide. +# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide. # # THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE # AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use, # reproduction, modification, or disclosure of this program is # strictly prohibited. Any use of this program by an authorized @@ -18,17 +18,21 @@ RightConf::Profile.set_configurator_signature(:test, '42') end it 'should reset when forcing checks' do flexmock(RightConf::Profile.instance).should_receive(:reset).once + old_check = RightConf::Profile.instance.instance_variable_get(:@force_check) RightConf::Profile.force_check RightConf::Profile.force_check?.should be_true + RightConf::Profile.instance.instance_variable_set(:@force_check, old_check) end it 'should reset when forcing re-configuration' do flexmock(RightConf::Profile.instance).should_receive(:reset).once + old_reconfigure = RightConf::Profile.instance.instance_variable_get(:@force_reconfigure) RightConf::Profile.force_reconfigure RightConf::Profile.force_reconfigure?.should be_true + RightConf::Profile.instance.instance_variable_set(:@force_reconfigure, old_reconfigure) end end