Sha256: 8339cdc60650487ae4dabe8d14bf9c2e6026275965edcddb16256489fda7c9f9
Contents?: true
Size: 1011 Bytes
Versions: 79
Compression:
Stored size: 1011 Bytes
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::Singleton do class Testy include RightConf::Singleton def testosterone 42 end def call_block(*args, &blk) blk.call end end it 'should forward class methods invokations to singleton instance' do Testy.testosterone.should == 42 Testy.instance.testosterone.should == 42 end it 'should also forward blocks' do Testy.call_block { 43 }.should == 43 end end
Version data entries
79 entries across 79 versions & 1 rubygems