summaryrefslogtreecommitdiffstats
path: root/spec/board_spec.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-06-27 11:49:10 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-06-27 11:49:10 +0200
commit06fe1fe549d6c7dbb643a07a485d24c3e45216d3 (patch)
tree90947a79c9732a3424b28fd972de06e070e95c53 /spec/board_spec.rb
parent2526cd9aef3bb7dc04901be4067dd211f03fe9b5 (diff)
parent7cfcad744d3e18cbe8a9f71c43a0cad1e8fdd6b4 (diff)
downloadedoors-ruby-06fe1fe549d6c7dbb643a07a485d24c3e45216d3.zip
edoors-ruby-06fe1fe549d6c7dbb643a07a485d24c3e45216d3.tar.gz
Merge branch 'rewrite0'
Diffstat (limited to 'spec/board_spec.rb')
-rw-r--r--spec/board_spec.rb14
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) ) )