Displaying 1 result from an estimated 1 matches for "title_confirmation".
2006 Jul 31
0
validates_confirmation_of won''t work
...t work just
fine:
----------------------------
class Challenge < ActiveRecord::Base
...
validates_confirmation_of :title
...
----------------------------
class ChallengeTest < Test::Unit::TestCase
...
def test_create
c = Challenge.new
assert !c.save
c.title = c.title_confirmation = "some random title"
c.body = "some body text"
assert c.save
end
----------------------------
this yields:
$ ruby test/unit/challenge_test.rb
Loaded suite test/unit/challenge_test
Started
..
Finished in 0.521554 seconds.
2 tests, 3 assertions, 0 failures, 0 errors
--...