You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by la...@apache.org on 2008/08/24 19:28:44 UTC

svn commit: r688534 - /incubator/buildr/trunk/spec/spec_helpers.rb

Author: lacton
Date: Sun Aug 24 10:28:44 2008
New Revision: 688534

URL: http://svn.apache.org/viewvc?rev=688534&view=rev
Log:
Info/Warn/Error message matcher would fail if no message at all

Modified:
    incubator/buildr/trunk/spec/spec_helpers.rb

Modified: incubator/buildr/trunk/spec/spec_helpers.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/spec/spec_helpers.rb?rev=688534&r1=688533&r2=688534&view=diff
==============================================================================
--- incubator/buildr/trunk/spec/spec_helpers.rb (original)
+++ incubator/buildr/trunk/spec/spec_helpers.rb Sun Aug 24 10:28:44 2008
@@ -51,6 +51,7 @@
       end
 
       def matches?(target)
+        $messages ||= {}
         $messages[@severity] = []
         target.call
         return Regexp === @expect ? $messages[@severity].join('\n') =~ @expect : $messages[@severity].include?(@expect.to_s)