mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-24 04:46:05 +08:00
[test] add spec for RM-494
This commit is contained in:
@@ -313,11 +313,19 @@ describe "Kernel.#block_given?" do
|
||||
end
|
||||
end
|
||||
|
||||
# RM-193
|
||||
describe "Method#to_proc" do
|
||||
# RM-193
|
||||
it "should return lambda block" do
|
||||
method(:test_block_dvars_proc).to_proc.lambda?.should == true
|
||||
end
|
||||
|
||||
# RM-RM-494
|
||||
it "Proc object should be able to call" do
|
||||
@proc = method(:test_block_dvars_proc).to_proc
|
||||
wait(0.2) {
|
||||
@proc.call.call.should == '123456'
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
describe "Proc#owner" do
|
||||
|
||||
Reference in New Issue
Block a user