summaryrefslogtreecommitdiffstats
path: root/spec/unit/util/queue.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/util/queue.rb')
-rwxr-xr-xspec/unit/util/queue.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/unit/util/queue.rb b/spec/unit/util/queue.rb
index 19af9430e..c8a75550e 100755
--- a/spec/unit/util/queue.rb
+++ b/spec/unit/util/queue.rb
@@ -19,16 +19,24 @@ end
mod = Puppet::Util::Queue
client_classes = { :default => make_test_client_class('Bogus::Default'), :setup => make_test_client_class('Bogus::Setup') }
-mod.register_queue_type(client_classes[:default], :default)
-mod.register_queue_type(client_classes[:setup], :setup)
describe Puppet::Util::Queue do
+ before :all do
+ mod.register_queue_type(client_classes[:default], :default)
+ mod.register_queue_type(client_classes[:setup], :setup)
+ end
+
before :each do
@class = Class.new do
extend mod
end
end
+ after :all do
+ instances = mod.instance_hash(:queue_clients)
+ [:default, :setup, :bogus, :aardvark, :conflict, :test_a, :test_b].each{ |x| instances.delete(x) }
+ end
+
context 'when determining a type name from a class' do
it 'should handle a simple one-word class name' do
mod.queue_type_from_class(make_test_client_class('Foo')).should == :foo