diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-10 22:52:29 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-10 22:52:29 +0200 |
commit | 2fd2f49b684ba22dea0ed9313b3ce257b4b82488 (patch) | |
tree | d22162cca392314fac607b222ac00e7a9d86e35d /spec | |
parent | 6867e3fb5377a7a80ad93cca2918e19e4a5fe52b (diff) | |
download | edoors-ruby-2fd2f49b684ba22dea0ed9313b3ce257b4b82488.zip edoors-ruby-2fd2f49b684ba22dea0ed9313b3ce257b4b82488.tar.gz |
specs: typos, add JSON output compare
Diffstat (limited to 'spec')
-rw-r--r-- | spec/board_spec.rb | 2 | ||||
-rw-r--r-- | spec/door_spec.rb | 3 | ||||
-rw-r--r-- | spec/link_spec.rb | 1 | ||||
-rw-r--r-- | 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 |