Sha256: a11a73c1022726a60dae9c1e4f6d1895d5391a6f01d877e23e873b04919684b0
Contents?: true
Size: 1.57 KB
Versions: 34
Compression:
Stored size: 1.57 KB
Contents
# 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 # licensee is strictly subject to the terms and conditions, # including confidentiality obligations, set forth in the applicable # License Agreement between RightScale.com, Inc. and # the licensee require File.join(File.dirname(__FILE__), 'spec_helper') describe RightConf::Profile do it 'should save profile to disk when changing values' do flexmock(RightConf::Profile.instance).should_receive(:persist).once 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
Version data entries
34 entries across 34 versions & 1 rubygems