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