From 2fd2f49b684ba22dea0ed9313b3ce257b4b82488 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 10 May 2012 22:52:29 +0200 Subject: specs: typos, add JSON output compare --- spec/board_spec.rb | 2 +- spec/door_spec.rb | 3 ++- spec/link_spec.rb | 1 + spec/particle_spec.rb | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/spec/board_spec.rb b/spec/board_spec.rb index d876861..1d4d931 100644 --- a/spec/board_spec.rb +++ b/spec/board_spec.rb @@ -73,7 +73,7 @@ describe EvenDoors::Board do b0.follow.should be_true end # - it "link->json->link" do + it "board->json->board" do board = EvenDoors::Board.new 'hell' p0 = EvenDoors::Particle.new p1 = EvenDoors::Particle.new diff --git a/spec/door_spec.rb b/spec/door_spec.rb index 46c43d3..5b0fb6f 100644 --- a/spec/door_spec.rb +++ b/spec/door_spec.rb @@ -69,10 +69,11 @@ describe EvenDoors::Door do p1.should be p0 end # - it "link->json->link" do + it "door->json->door" do door = EvenDoors::Door.new 'hell' hell = EvenDoors::Door.json_create( JSON.load( JSON.generate(door) ) ) door.name.should eql hell.name + JSON.generate(door).should eql JSON.generate(hell) end # end diff --git a/spec/link_spec.rb b/spec/link_spec.rb index 05d7a5c..9ad728e 100644 --- a/spec/link_spec.rb +++ b/spec/link_spec.rb @@ -33,6 +33,7 @@ describe EvenDoors::Link do link.fields.should eql lnk.fields link.cond_fields.should eql lnk.cond_fields link.cond_value.should eql lnk.cond_value + JSON.generate(link).should eql JSON.generate(lnk) end # end diff --git a/spec/particle_spec.rb b/spec/particle_spec.rb index 6b94c42..a7c4755 100644 --- a/spec/particle_spec.rb +++ b/spec/particle_spec.rb @@ -234,6 +234,7 @@ describe EvenDoors::Particle do py['k3'].should eql 'v6' py['k4'].should eql 'v7' py['k5'].should eql 'v8' + JSON.generate(p0).should eql JSON.generate(px) end # end -- cgit v1.1-2-g2b99