Sha256: 97457d98a3267c20b6dbdc80891ae6a94ec1e0b6a14122a22cf24ec57d293bc3

Contents?: true

Size: 627 Bytes

Versions: 2

Compression:

Stored size: 627 Bytes

Contents

# The DCell specs start a completely separate Ruby VM running this code
# for complete integration testing using 0MQ over TCP

require 'rubygems'
require 'bundler'
Bundler.setup

require 'dcell'
DCell.setup :id => 'test_node', :addr => 'tcp://127.0.0.1:21264'

class TestActor
  include Celluloid
  attr_reader :value

  def initialize
    @value = 42
  end

  def the_answer
    DCell::Global[:the_answer]
  end

  def crash
    raise "the spec purposely crashed me :("
  end
end

class TestApplication < Celluloid::Application
  supervise DCell::Application
  supervise TestActor, :as => :test_actor
end

TestApplication.run

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dcell-0.7.1 spec/test_node.rb
dcell-0.0.1 spec/test_node.rb