Module: Spec::Rails::Matchers

Defined in:
lib/validates_timeliness/spec/rails/matchers/validate_timeliness.rb

Defined Under Namespace

Classes: ValidateTimeliness

Instance Method Summary collapse

Instance Method Details

#validate_date(attribute, options = {}) ⇒ Object



147
148
149
150
# File 'lib/validates_timeliness/spec/rails/matchers/validate_timeliness.rb', line 147

def validate_date(attribute, options={})
  options[:type] = :date
  ValidateTimeliness.new(attribute, options)
end

#validate_datetime(attribute, options = {}) ⇒ Object



157
158
159
160
# File 'lib/validates_timeliness/spec/rails/matchers/validate_timeliness.rb', line 157

def validate_datetime(attribute, options={})
  options[:type] = :datetime
  ValidateTimeliness.new(attribute, options)
end

#validate_time(attribute, options = {}) ⇒ Object



152
153
154
155
# File 'lib/validates_timeliness/spec/rails/matchers/validate_timeliness.rb', line 152

def validate_time(attribute, options={})
  options[:type] = :time
  ValidateTimeliness.new(attribute, options)
end