<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>features/matchers/define_matcher_with_user_customizable_message.feature</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -2,6 +2,9 @@
 
 * enhancements
   * better messages for should[_not] be_nil (Chad Humphries and Rob Sanheim)
+  * should and should_not accept optional hash, allowing customized messages
+    (suggestion from Rob Sanheim)
+    * result.should be_nil, :or =&gt; &quot;we really expected result to be nil&quot;
 
 * bug fixes
   * fixed --line option for ruby 1.9.1</diff>
      <filename>History.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -79,8 +79,8 @@ module Spec
         #   describe Person do
         #     it { should be_eligible_to_vote }
         #   end
-        def should(matcher=nil)
-          self == subject ? self.__should_for_example_group__(matcher) : subject.should(matcher)
+        def should(matcher=nil, options={})
+          self == subject ? self.__should_for_example_group__(matcher) : subject.should(matcher,options)
         end
 
         # Just like +should+, +should_not+ delegates to the subject (implicit or
@@ -91,8 +91,8 @@ module Spec
         #   describe Person do
         #     it { should_not be_eligible_to_vote }
         #   end
-        def should_not(matcher=nil)
-          self == subject ? self.__should_not_for_example_group__(matcher) : subject.should_not(matcher)
+        def should_not(matcher=nil, options={})
+          self == subject ? self.__should_not_for_example_group__(matcher) : subject.should_not(matcher,options)
         end
       end
     end</diff>
      <filename>lib/spec/example/subject.rb</filename>
    </modified>
    <modified>
      <diff>@@ -23,8 +23,8 @@ module Kernel
   #
   # NOTE that this does NOT support receiver.should != expected.
   # Instead, use receiver.should_not == expected
-  def should(matcher=nil, &amp;block)
-    Spec::Expectations::PositiveExpectationHandler.handle_matcher(self, matcher, &amp;block)
+  def should(matcher=nil, options={}, &amp;block)
+    Spec::Expectations::PositiveExpectationHandler.handle_matcher(self, matcher, options, &amp;block)
   end
   
   # :call-seq:
@@ -46,7 +46,7 @@ module Kernel
   #     =&gt; Passes unless (receiver =~ regexp)
   #
   # See Spec::Matchers for more information about matchers
-  def should_not(matcher=nil, &amp;block)
-    Spec::Expectations::NegativeExpectationHandler.handle_matcher(self, matcher, &amp;block)
+  def should_not(matcher=nil, options={}, &amp;block)
+    Spec::Expectations::NegativeExpectationHandler.handle_matcher(self, matcher, options, &amp;block)
   end
 end</diff>
      <filename>lib/spec/expectations/extensions/kernel.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ module Spec
     class InvalidMatcherError &lt; ArgumentError; end        
     
     class PositiveExpectationHandler        
-      def self.handle_matcher(actual, matcher, &amp;block)
+      def self.handle_matcher(actual, matcher, options={}, &amp;block)
         ::Spec::Matchers.last_should = :should
         ::Spec::Matchers.last_matcher = matcher
         return ::Spec::Matchers::PositiveOperatorMatcher.new(actual) if matcher.nil?
@@ -18,13 +18,13 @@ module Spec
         if matcher.respond_to?(:diffable?) &amp;&amp; matcher.diffable?
           ::Spec::Expectations.fail_with message, matcher.expected.first, matcher.actual
         else
-          ::Spec::Expectations.fail_with message
+          ::Spec::Expectations.fail_with message &lt;&lt; (options[:or] ? &quot;\n#{options[:or]}&quot; : &quot;&quot;)
         end
       end
     end
 
     class NegativeExpectationHandler
-      def self.handle_matcher(actual, matcher, &amp;block)
+      def self.handle_matcher(actual, matcher, options={}, &amp;block)
         ::Spec::Matchers.last_should = :should_not
         ::Spec::Matchers.last_matcher = matcher
         return ::Spec::Matchers::NegativeOperatorMatcher.new(actual) if matcher.nil?
@@ -41,7 +41,7 @@ module Spec
         if matcher.respond_to?(:diffable?) &amp;&amp; matcher.diffable?
           ::Spec::Expectations.fail_with message, matcher.expected.first, matcher.actual
         else
-          ::Spec::Expectations.fail_with message
+          ::Spec::Expectations.fail_with message &lt;&lt; (options[:or] ? &quot;\n#{options[:or]}&quot; : &quot;&quot;)
         end
       end
     end</diff>
      <filename>lib/spec/expectations/handler.rb</filename>
    </modified>
    <modified>
      <diff>@@ -95,6 +95,15 @@ module Spec
           Spec::Expectations::PositiveExpectationHandler.handle_matcher(actual, matcher)
           
         end
+        
+        it &quot;appends the :or message in the options hash passed to should&quot; do
+          matcher = mock(&quot;matcher&quot;, :failure_message_for_should =&gt; &quot;message&quot;, :matches? =&gt; false)
+          actual = Object.new
+          
+          ::Spec::Expectations.should_receive(:fail_with).with(&quot;message\nextension&quot;)
+          
+          Spec::Expectations::PositiveExpectationHandler.handle_matcher(actual, matcher, :or =&gt; &quot;extension&quot;)
+        end
       end
     end
 
@@ -160,6 +169,15 @@ module Spec
           Spec::Expectations::NegativeExpectationHandler.handle_matcher(actual, matcher)
         end
 
+        it &quot;appends the :or message in the options hash passed to should&quot; do
+          matcher = mock(&quot;matcher&quot;, :failure_message_for_should_not =&gt; &quot;message&quot;, :matches? =&gt; true)
+          actual = Object.new
+          
+          ::Spec::Expectations.should_receive(:fail_with).with(&quot;message\nextension&quot;)
+          
+          Spec::Expectations::NegativeExpectationHandler.handle_matcher(actual, matcher, :or =&gt; &quot;extension&quot;)
+        end
+
       end
     end
     </diff>
      <filename>spec/spec/expectations/handler_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4e22ff08a490eb4062b04aa46725ab2577da5adf</id>
    </parent>
  </parents>
  <author>
    <name>David Chelimsky</name>
    <email>dchelimsky@gmail.com</email>
  </author>
  <url>http://github.com/dchelimsky/rspec/commit/1420b6f02f5fe2ba97286d895b8215617f80d4a6</url>
  <id>1420b6f02f5fe2ba97286d895b8215617f80d4a6</id>
  <committed-date>2009-06-28T00:00:48-07:00</committed-date>
  <authored-date>2009-06-28T00:00:48-07:00</authored-date>
  <message>should and should_not accept optional hash, allowing customized messages
    (suggestion from Rob Sanheim)</message>
  <tree>9117e424fb1b7cc26f33b8d46120c9fc62cecd25</tree>
  <committer>
    <name>David Chelimsky</name>
    <email>dchelimsky@gmail.com</email>
  </committer>
</commit>
