Displaying 1 result from an estimated 1 matches for "challengetest".
Did you mean:
challenge_test
2006 Jul 31
0
validates_confirmation_of won''t work
...to have a problem validating confirmation of a password. The
first two snippets are some model code and some test code that 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....