diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-10 23:18:17 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-10 23:18:17 +0200 |
commit | a090cd59b7405fdbb4fb5097bfec0b41400a3a90 (patch) | |
tree | a2ba321f38fb59234a5c17caa0a728236bc54ae3 | |
parent | 62cf22cd59f4933671e188fb8e550299617ba18e (diff) | |
download | edoors-ruby-a090cd59b7405fdbb4fb5097bfec0b41400a3a90.zip edoors-ruby-a090cd59b7405fdbb4fb5097bfec0b41400a3a90.tar.gz |
specs: Spin->json->Spin
-rw-r--r-- | spec/spin_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/spin_spec.rb b/spec/spin_spec.rb index 1e640b2..b67fb6e 100644 --- a/spec/spin_spec.rb +++ b/spec/spin_spec.rb @@ -73,6 +73,20 @@ describe EvenDoors::Spin do lambda { EvenDoors::Spin.new('dom1') }.should raise_error(EvenDoors::Exception) end # + it "spin->json->spin" do + spin = EvenDoors::Spin.new 'dom0', :debug_routing=>true + p0 = EvenDoors::Spin.require_p EvenDoors::Particle + p1 = EvenDoors::Spin.require_p EvenDoors::Particle + p2 = EvenDoors::Spin.require_p EvenDoors::Particle + EvenDoors::Spin.send_p p0 + EvenDoors::Spin.send_p p1 + EvenDoors::Spin.send_sys_p p2 + json = JSON.generate spin + EvenDoors::Spin.clear! + dom0 = EvenDoors::Spin.json_create( JSON.load( json ) ) + json.should eql JSON.generate(dom0) + end + # end # #EOF |