Sha256: a21eddbec33e6a40ea052e2db9b7c02b7006870ce678c8a47c1cb703d90c802a

Contents?: true

Size: 771 Bytes

Versions: 9

Compression:

Stored size: 771 Bytes

Contents

require 'spec_helper'

describe Celluloid, "extensions" do
  before do
    class WillKane
      include Celluloid

      def speak
        "Don't shove me Harv."
      end
    end
    @marshal = WillKane.new
  end

  it "marshals Celluloid::ActorProxy objects" do
    string = Marshal.dump(@marshal)
    Marshal.load(string).should be_alive
  end

  it "marshals Celluloid::Mailbox objects" do
    @marshal.mailbox.should be_a(Celluloid::Mailbox)
    string = Marshal.dump(@marshal.mailbox)
    Marshal.load(string).should be_alive
  end

  it "marshals Celluloid::Future objects" do
    future = @marshal.future(:speak)
    future.should be_a(Celluloid::Future)
    string = Marshal.dump(future)
    Marshal.load(string).value.should == "Don't shove me Harv."
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
dcell-0.16.0 spec/dcell/celluloid_ext_spec.rb
dcell-0.16.0.pre spec/dcell/celluloid_ext_spec.rb
dcell-0.15.0 spec/dcell/celluloid_ext_spec.rb
dcell-0.15.0.pre spec/dcell/celluloid_ext_spec.rb
dcell-0.14.0 spec/dcell/celluloid_ext_spec.rb
dcell-0.13.0 spec/dcell/celluloid_ext_spec.rb
dcell-0.13.0.pre spec/dcell/celluloid_ext_spec.rb
dcell-0.12.0.pre spec/dcell/celluloid_ext_spec.rb
dcell-0.10.0 spec/dcell/celluloid_ext_spec.rb