summaryrefslogtreecommitdiffstats
path: root/spec/iota_spec.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-06-22 23:37:28 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-06-22 23:37:28 +0200
commit2526cd9aef3bb7dc04901be4067dd211f03fe9b5 (patch)
tree8110e7e59e5586d07ef4342e2793a1e30a835f95 /spec/iota_spec.rb
parent0604ff5819137a9acd19bc5f0c393d47ea9a19a7 (diff)
downloadedoors-ruby-2526cd9aef3bb7dc04901be4067dd211f03fe9b5.zip
edoors-ruby-2526cd9aef3bb7dc04901be4067dd211f03fe9b5.tar.gz
spec/spot_spec -> spec/iota_spec
Diffstat (limited to 'spec/iota_spec.rb')
-rw-r--r--spec/iota_spec.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/iota_spec.rb b/spec/iota_spec.rb
new file mode 100644
index 0000000..38f61b7
--- /dev/null
+++ b/spec/iota_spec.rb
@@ -0,0 +1,26 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+
+require 'spec_helper'
+#
+describe Edoors::Iota do
+ #
+ it "path construction" do
+ class S<Edoors::Iota
+ def add_iota s
+ end
+ end
+ s0 = S.new 'top', nil
+ s1 = S.new 'room0', s0
+ s2 = S.new 'room1', s1
+ s3 = S.new 'door', s2
+ s3.path.should eql 'top/room0/room1/door'
+ lambda { Edoors::Iota.new('do/or0', nil) }.should raise_error(Edoors::Exception)
+ lambda { Edoors::Iota.new('/door0', nil) }.should raise_error(Edoors::Exception)
+ lambda { Edoors::Iota.new('door0/', nil) }.should raise_error(Edoors::Exception)
+ end
+ #
+end
+#
+# EOF