Skip to content
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.

Fix tests with blocks running on sender #47

Merged
merged 2 commits into from Mar 27, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions spec/celluloid/io/tcp_socket_spec.rb
Expand Up @@ -108,6 +108,7 @@
end end


it "raises IOError when partial reading from a socket the peer closed" do it "raises IOError when partial reading from a socket the peer closed" do
pending "async block running on receiver"
with_connected_sockets do |subject, peer| with_connected_sockets do |subject, peer|
actor = ExampleActor.new actor = ExampleActor.new
begin begin
Expand Down
9 changes: 9 additions & 0 deletions spec/spec_helper.rb
Expand Up @@ -8,6 +8,14 @@
logfile = File.open(File.expand_path("../../log/test.log", __FILE__), 'a') logfile = File.open(File.expand_path("../../log/test.log", __FILE__), 'a')
Celluloid.logger = Logger.new(logfile) Celluloid.logger = Logger.new(logfile)


RSpec.configure do |config|
config.before do
Celluloid.shutdown
Celluloid.boot
FileUtils.rm("/tmp/cell_sock") if File.exist?("/tmp/cell_sock")
end
end

# FIXME: Hax until test termination can be cleaned up # FIXME: Hax until test termination can be cleaned up
module Celluloid module Celluloid
class << self class << self
Expand All @@ -17,6 +25,7 @@ def shutdown; end # hax: noop!


class ExampleActor class ExampleActor
include Celluloid::IO include Celluloid::IO
execute_block_on_receiver :wrap


def wrap def wrap
yield yield
Expand Down