summaryrefslogtreecommitdiffstats
path: root/spec/spot_spec.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-05-10 09:31:26 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-05-10 09:31:26 +0200
commit6886fa096d832b0682eafe631922694653384994 (patch)
treeb224ac22372483404305eecbe99528ae2b1b94cf /spec/spot_spec.rb
parent274411458b30ba08a9e0adca0a0f5820e9a8648f (diff)
downloadedoors-ruby-6886fa096d832b0682eafe631922694653384994.zip
edoors-ruby-6886fa096d832b0682eafe631922694653384994.tar.gz
split specs
Diffstat (limited to 'spec/spot_spec.rb')
-rw-r--r--spec/spot_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/spot_spec.rb b/spec/spot_spec.rb
new file mode 100644
index 0000000..3698ae9
--- /dev/null
+++ b/spec/spot_spec.rb
@@ -0,0 +1,22 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+
+require 'spec_helper'
+#
+describe EvenDoors::Spot do
+ #
+ it "path construction" do
+ s0 = EvenDoors::Spot.new 'top', nil
+ s1 = EvenDoors::Spot.new 'room0', s0
+ s2 = EvenDoors::Spot.new 'room1', s1
+ s3 = EvenDoors::Spot.new 'door', s2
+ s3.path.should eql 'top/room0/room1/door'
+ lambda { EvenDoors::Spot.new('do/or0', nil) }.should raise_error(EvenDoors::Exception)
+ lambda { EvenDoors::Spot.new('/door0', nil) }.should raise_error(EvenDoors::Exception)
+ lambda { EvenDoors::Spot.new('door0/', nil) }.should raise_error(EvenDoors::Exception)
+ end
+ #
+end
+#
+# EOF