module RSpec::HtmlMatchers
def with_date_field date_field_type, name=nil, options={}
def with_date_field date_field_type, name=nil, options={} date_field_type = date_field_type.to_s raise "unknown type `#{date_field_type}` for date picker" unless DATE_FIELD_TYPES.include?(date_field_type) options = { :with => { :type => date_field_type.to_s }.merge(options.delete(:with)||{}) } options[:with].merge!(:name => name.to_s) if name should_have_input(options) end