Sha256: 267f26cf2b3e6f49ced0727b3c1949c34e082af61315dd69a75e9567e20dfa83
Contents?: true
Size: 1.83 KB
Versions: 34
Compression:
Stored size: 1.83 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::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 it 'should default to no suffix' do def test(val); val; end flexmock(RightConf::Platform.instance).should_receive(:family).and_return('non-existent') RightConf::Platform.dispatch(41) { :test }.should == 41 end end
Version data entries
34 entries across 34 versions & 1 rubygems