Sha256: e8c09baad0333db96064ae27f9440f9255b6dbd7078aef0265a1179e1ea69160
Contents?: true
Size: 599 Bytes
Versions: 2
Compression:
Stored size: 599 Bytes
Contents
require File.dirname(__FILE__) + '/spec_helper' describe Fiber do before(:each) do @fiber = Fiber.new do (1..10).each { |i| Fiber.yield } end end it 'should respond to all the class methods' do Fiber.should respond_to(*%w(yield current)) end it 'should respond to all the instance methods' do @fiber.should respond_to(*%w(resume yield)) end it 'should raise an error when it is done' do lambda { 100.times { @fiber.resume } }.should raise_error end it 'should return a string from inspect' do @fiber.inspect.should be_a_kind_of(String) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
darkhelmet-darkext-0.11.1 | spec/fiber_spec.rb |
darkhelmet-darkext-0.11.2 | spec/fiber_spec.rb |