Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Helper method spec

  • Loading branch information...
commit 969edfcb8332b5e1760cde90508cd4a4412f77e2 1 parent 1faf0ef
Adam Meehan adzap authored

Showing 1 changed file with 10 additions and 1 deletion. Show diff stats Hide diff stats

  1. +10 1 spec/validates_timeliness/helper_methods_spec.rb
11 spec/validates_timeliness/helper_methods_spec.rb
@@ -13,9 +13,18 @@
13 13 Person.new.should respond_to(:validates_datetime)
14 14 end
15 15
16   - it 'should validate instance when validation method called' do
  16 + it 'should validate instance using class validation defined' do
  17 + Person.validates_date :birth_date
  18 + r = Person.new
  19 + r.valid?
  20 +
  21 + r.errors[:birth_date].should_not be_empty
  22 + end
  23 +
  24 + it 'should validate instance using instance valiation method' do
17 25 r = Person.new
18 26 r.validates_date :birth_date
  27 +
19 28 r.errors[:birth_date].should_not be_empty
20 29 end
21 30 end

0 comments on commit 969edfc

Please sign in to comment.
Something went wrong with that request. Please try again.