Sha256: 29e6fe6d1d0b4e3ec86e58c9dd752990aba2d92b31afbeb56ce64692e0e88cc7

Contents?: true

Size: 1.61 KB

Versions: 67

Compression:

Stored size: 1.61 KB

Contents

# Copyright (C) 2011 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::Platform do

   it 'should try to dispatch using platform family' do
    def test_amiga(val); val; end
    flexmock(RightConf::Platform.instance).should_receive(:family).and_return('amiga')
    RightConf::Platform.dispatch(44) { :test }.should == 44
  end

   it 'should try to dispatch using platform family and flavor' do
    def test_atari_st(val); val; end
    flexmock(RightConf::Platform.instance).should_receive(:flavor).and_return('st')
    flexmock(RightConf::Platform.instance).should_receive(:family).and_return('atari')
    RightConf::Platform.dispatch(43) { :test }.should == 43
  end

it 'should try to dispatch using platform family, flavor and release' do
    def test_commodore_c_64(val); val; end
    flexmock(RightConf::Platform.instance).should_receive(:release).and_return('64')
    flexmock(RightConf::Platform.instance).should_receive(:flavor).and_return('c')
    flexmock(RightConf::Platform.instance).should_receive(:family).and_return('commodore')
    RightConf::Platform.dispatch(42) { :test }.should == 42
  end

end

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
rconf-0.8.21 spec/platform_spec.rb
rconf-0.8.20 spec/platform_spec.rb
rconf-0.8.19 spec/platform_spec.rb
rconf-0.8.18 spec/platform_spec.rb
rconf-0.8.17 spec/platform_spec.rb
rconf-0.8.16 spec/platform_spec.rb
rconf-0.8.15 spec/platform_spec.rb
rconf-0.8.14 spec/platform_spec.rb
rconf-0.8.13 spec/platform_spec.rb
rconf-0.8.12 spec/platform_spec.rb
rconf-0.8.11 spec/platform_spec.rb
rconf-0.8.10 spec/platform_spec.rb
rconf-0.8.9 spec/platform_spec.rb
rconf-0.8.8 spec/platform_spec.rb
rconf-0.8.5 spec/platform_spec.rb
rconf-0.8.4 spec/platform_spec.rb
rconf-0.8.3 spec/platform_spec.rb
rconf-0.8.2 spec/platform_spec.rb
rconf-0.8.1 spec/platform_spec.rb
rconf-0.8.0 spec/platform_spec.rb