Sha256: 38feb63eac3befd2b77f6feb1194327ea67ef7cd7d86cbefef788c001888f3c0
Contents?: true
Size: 931 Bytes
Versions: 8
Compression:
Stored size: 931 Bytes
Contents
require File.join(File.dirname(__FILE__), '..', 'spec_helper') describe "Proc#to_source from { ... } block (wo nesting complication)" do expected = 'proc { @x%s }' should 'handle watever(..) { ... }' do ( watever(:a, :b, {:c => 1}) { @x1 } ).should.be having_source(expected%1) end should 'handle watever(..) \ { ... }' do ( watever(:a, :b, {:c => 1}) \ { @x2 } ).should.be having_source(expected%2) end should 'handle watever { ... }' do ( watever { @x3 } ).should.be having_source(expected%3) end should 'handle watever \ { ... }' do ( watever \ { @x4 } ).should.be having_source(expected%4) end should 'handle lambda { ... }' do ( lambda { @x5 } ).should.be having_source(expected%5) end should 'handle lambda \ { ... }' do ( lambda \ { @x6 } ).should.be having_source(expected%6) end end
Version data entries
8 entries across 8 versions & 1 rubygems