+1 On Fri, Dec 18, 2009 at 7:01 PM, Jesse Wolfe <[email protected]> wrote: > This spec wasn't cleaing up after itself, and raised several exceptions > when trying to register the same queue type again. > Part of the #2879 test idempotency suite. > > Signed-off-by: Jesse Wolfe <[email protected]> > --- > spec/unit/util/queue.rb | 12 ++++++++++-- > 1 files changed, 10 insertions(+), 2 deletions(-) > > diff --git a/spec/unit/util/queue.rb b/spec/unit/util/queue.rb > index 19af943..c8a7555 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 > -- > 1.6.5 > > -- > > You received this message because you are subscribed to the Google Groups > "Puppet Developers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/puppet-dev?hl=en. > > >
-- ----------------------------------------------------------- The power of accurate observation is commonly called cynicism by those who have not got it. ~George Bernard Shaw ------------------------------------------------------------ -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
