From a090cd59b7405fdbb4fb5097bfec0b41400a3a90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 10 May 2012 23:18:17 +0200 Subject: specs: Spin->json->Spin --- spec/spin_spec.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 -- cgit v1.1-2-g2b99