diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-06-26 16:52:37 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-06-26 16:52:37 +0200 |
commit | 0a79ea102e6277fdb81cc3a160124202fa040c3f (patch) | |
tree | 4d83598b74bec9a09a20efbb33b9a7e78cdf3e96 /spec/board_spec.rb | |
parent | 556bfae035b88ecbf7ae20d7964c3599615b950f (diff) | |
download | edoors-ruby-0a79ea102e6277fdb81cc3a160124202fa040c3f.zip edoors-ruby-0a79ea102e6277fdb81cc3a160124202fa040c3f.tar.gz |
update board_specs
Diffstat (limited to 'spec/board_spec.rb')
-rw-r--r-- | spec/board_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/board_spec.rb b/spec/board_spec.rb index 7e291c6..1b2e0c4 100644 --- a/spec/board_spec.rb +++ b/spec/board_spec.rb @@ -16,11 +16,11 @@ describe Edoors::Board do # it "require_p release_p" do board = Edoors::Board.new 'hell', @spin - p0 = board.require_p Edoors::Particle + p0 = board.require_p p1 = board.require_p Edoors::Particle (p0===p1).should be_false board.release_p p0 - p2 = board.require_p Edoors::Particle + p2 = board.require_p (p0===p2).should be_true end # @@ -29,14 +29,14 @@ describe Edoors::Board do p0['k0'] = 'v0' p0['k1'] = 'neither' p0['k2'] = 'v2' - p0.set_link_fields 'k0,k2' - p0.link_value.should eql 'v0v2' + p0.set_link_keys 'k0', 'k2' + p0.link_value.should == {'k0'=>'v0','k2'=>'v2'} p1 = Edoors::Particle.new p1['k0'] = 'v0' p1['k1'] = 'nore' p1['k2'] = 'v2' - p1.set_link_fields 'k0,k2' - p1.link_value.should eql 'v0v2' + p1.set_link_keys 'k0', 'k2' + p1.link_value.should == {'k0'=>'v0','k2'=>'v2'} P0 = p0 P1 = p1 class Board0 < Edoors::Board @@ -79,7 +79,7 @@ describe Edoors::Board do p0 = Edoors::Particle.new p1 = Edoors::Particle.new p1['v0']=0 - p1.set_link_fields 'v0' + p1.set_link_keys 'v0' board.process_p p0 board.process_p p1 hell = Edoors::Board.json_create( JSON.load( JSON.generate(board) ) ) |