Sha256: 944e3f72c2df75c673581eb34926a013425230e5176a5e44397c795c415007e0
Contents?: true
Size: 320 Bytes
Versions: 29
Compression:
Stored size: 320 Bytes
Contents
describe "Symbol#to_proc" do it "returns a new Proc" do proc = :to_s.to_proc proc.should be_kind_of(Proc) end it "sends self to arguments passed when calling #call on the proc" do obj = Object.new def obj.to_s; "Received #to_s"; end :to_s.to_proc.call(obj).should == "Received #to_s" end end
Version data entries
29 entries across 29 versions & 1 rubygems