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

Version Path
rconf-1.0.13 spec/profile_spec.rb
rconf-1.0.12 spec/profile_spec.rb
rconf-1.0.11 spec/profile_spec.rb
rconf-1.0.10 spec/profile_spec.rb
rconf-1.0.9 spec/profile_spec.rb
rconf-1.0.8 spec/profile_spec.rb
rconf-1.0.7 spec/profile_spec.rb
rconf-1.0.6 spec/profile_spec.rb
rconf-1.0.5 spec/profile_spec.rb
rconf-1.0.4 spec/profile_spec.rb
rconf-1.0.3 spec/profile_spec.rb
rconf-1.0.1 spec/profile_spec.rb
rconf-1.0.0 spec/profile_spec.rb
rconf-0.10.1 spec/profile_spec.rb
rconf-0.10.0 spec/profile_spec.rb
rconf-0.9.25 spec/profile_spec.rb
rconf-0.9.24 spec/profile_spec.rb
rconf-0.9.23 spec/profile_spec.rb
rconf-0.9.22 spec/profile_spec.rb
rconf-0.9.21 spec/profile_spec.rb