Sha256: e6947c1c849203fa2c810bbb64df183be50100ea69aec3019028a49f943edad2
Contents?: true
Size: 678 Bytes
Versions: 8
Compression:
Stored size: 678 Bytes
Contents
require File.join(File.dirname(__FILE__), '..', 'spec_helper') describe "Proc#to_source from { ... } block (w nested hash)" do should 'handle simple' do ( lambda { {:a => 1, :b => 2} } ).should.be having_source(%Q\ proc do {:a => 1, :b => 2} end \) end should 'handle nested' do ( lambda { {:a => 1, :b => {:c => 3}} } ).should.be having_source(%Q\ proc do {:a => 1, :b => {:c => 3}} end \) end if RUBY_VERSION.include?('1.9.') require File.join(File.dirname(__FILE__), '19x_extras') behaves_like 'Proc#to_source from { ... } block (1.9.*)' end end
Version data entries
8 entries across 8 versions & 1 rubygems