def discard(*parts)
      @discard ||= []
      @discard  += parts

      parts.each do |part|
        # TODO: create a HasHiddenInput matcher
        replace_matcher(part, HasInput.new.with_attribute(:type => :hidden))
      end
      self
    end
def discard(*parts)
      @discard ||= []
      @discard  += parts

      parts.each do |part|
        # TODO: create a HasHiddenInput matcher
        replace_matcher(part, HasInput.new.with_attribute(:type => :hidden))
      end
      self
    end
Initializes a HasDateSelect matcher.
 Specifies that one or more components of the date will be hidden by Rails' +date_select+
 helper. For example, calling +date_select+ with the option <tt>:discard_day => true</tt>
 produces two +<select>+ elments (for the year and month components) and one hidden input for
 the date component:

   <select name="model[date(1i)]">...</select>
   <select name="model[date(2i)]">...</select>
   <input type="hidden" name="model[date(3i)]" />

 Since the default is to match three +<select>+ elements, one must call +discard(:day)+ to tell
 a HasDateSelect matcher to expect a hidden input for the third component.

 @note This modifier replaces the matchers for the given date components. Any modifiers that
   were called before this one will be lost for those matchers. Therefor, +discard+ should be
   called before other modifiers, such as +for+. For example, the following matcher
   will only test the input names for the month and day components.

     it { should have_date_select.for(:start_date).discard(:year) }

   In order to test the input names for all three components, the +for+ modifier must come
   after the +discard+ modifier:

     it { should have_date_select.discard(:year).for(:start_date) }

 @param [Symbols]  *parts  A variable number of symbols specifying which components should be
                           discarded. Valid symbols are +:year+, +:month+, and +:day+.

 @return [HasDateSelect] self