summaryrefslogtreecommitdiffstats
path: root/spec/spin_spec.rb
diff options
context:
space:
mode:
authorJérémy <jeremy@asynk.ch>2012-05-10 21:25:43 +0200
committerJérémy <jeremy@asynk.ch>2012-05-10 21:25:43 +0200
commit62a07e34c3af77fbe6735dc315bc0d28a3f891bc (patch)
tree2c8198f282c21f7d42cfa07543ede6652d9b721b /spec/spin_spec.rb
parent9b704b544d33ab3db45a3519bd25aa27c25d89ad (diff)
downloadedoors-ruby-62a07e34c3af77fbe6735dc315bc0d28a3f891bc.zip
edoors-ruby-62a07e34c3af77fbe6735dc315bc0d28a3f891bc.tar.gz
specs: follow new Spin#clear! policy
Diffstat (limited to 'spec/spin_spec.rb')
-rw-r--r--spec/spin_spec.rb20
1 files changed, 7 insertions, 13 deletions
diff --git a/spec/spin_spec.rb b/spec/spin_spec.rb
index 97ba7b2..1e640b2 100644
--- a/spec/spin_spec.rb
+++ b/spec/spin_spec.rb
@@ -6,6 +6,10 @@ require 'spec_helper'
#
describe EvenDoors::Spin do
#
+ before(:each) do
+ EvenDoors::Spin.clear!
+ end
+ #
class MyP < EvenDoors::Particle; end
#
it "Particles pool" do
@@ -56,25 +60,15 @@ describe EvenDoors::Spin do
f.sp.should be p1
end
#
- it "options" do
+ it "option debug" do
EvenDoors::Spin.debug_routing.should be false
- spin = EvenDoors::Spin.new 'dom0', :debug_routing=>true
- EvenDoors::Spin.debug_routing.should be true
- spin.spin!
- EvenDoors::Spin.debug_routing = false
- EvenDoors::Spin.debug_routing.should be false
- #
- EvenDoors::Spin.spin = nil
EvenDoors::Spin.debug_errors.should be false
- spin = EvenDoors::Spin.new 'dom0', :debug_errors=>true
+ spin = EvenDoors::Spin.new 'dom0', :debug_routing=>true, :debug_errors=>true
+ EvenDoors::Spin.debug_routing.should be true
EvenDoors::Spin.debug_errors.should be true
- spin.spin!
- EvenDoors::Spin.debug_errors = false
- EvenDoors::Spin.debug_errors.should be false
end
#
it "only 1 Spin instance" do
- EvenDoors::Spin.spin = nil
spin = EvenDoors::Spin.new 'dom0', :debug_routing=>true
lambda { EvenDoors::Spin.new('dom1') }.should raise_error(EvenDoors::Exception)
end