Permalink
Browse files

Split 2 fiber specs with different behavior

  • Loading branch information...
1 parent e38045b commit 5c86a263ef9e158b9abd2ae100538ef010f36034 @evanphx evanphx committed Jan 10, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 spec/ruby/shared/fiber/resume.rb
@@ -16,12 +16,14 @@
fiber.send(@method).should be_true
end
- it "runs until the end of the block or Fiber.yield on first invocation" do
+ it "runs until the end of the block" do
obj = mock('obj')
obj.should_receive(:do).once
fiber = Fiber.new { 1 + 2; a = "glark"; obj.do }
fiber.send(@method)
+ end
+ it "runs until Fiber.yield" do
obj = mock('obj')
obj.should_not_receive(:do)
fiber = Fiber.new { 1 + 2; Fiber.yield; obj.do }

0 comments on commit 5c86a26

Please sign in to comment.