Sha256: a0f5ef3a76d62859b8111977543204801e8271310509dff2f346db556962ed17
Contents?: true
Size: 646 Bytes
Versions: 8
Compression:
Stored size: 646 Bytes
Contents
require File.join(File.dirname(__FILE__), '..', 'spec_helper') describe "Proc#to_source (variables)" do should 'handle non var' do lambda { x }.should.be having_source(%|proc { x }|) end should 'handle local var' do x = 'lx' lambda { x }.should.be having_source(%|proc { x }|) end should 'handle instance var' do @x = 'ix' lambda { @x }.should.be having_source(%|proc { @x }|) end should 'handle class var' do @@x = 'cx' lambda { @@x }.should.be having_source(%|proc { @@x }|) end should 'handle global var' do $x = 'gx' lambda { $x }.should.be having_source(%|proc { $x }|) end end
Version data entries
8 entries across 8 versions & 1 rubygems