Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (14 sloc) 0.466 kB
require File.expand_path('../../../spec_helper', __FILE__)
ruby_version_is "1.8.7" do
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 = mock("Receiving #to_s")
obj.should_receive(:to_s).and_return("Received #to_s")
:to_s.to_proc.call(obj).should == "Received #to_s"
end
end
end
Jump to Line
Something went wrong with that request. Please try again.