Hello Guy wrote:

> my English isnt so good, sorry. I dont understand everything you wrote.
> can you give me an example for a simpler test for my situation?

in your model:

   VALIDATE = /@#$%^/
   validates_format_of :snoo, VALIDATE

in the test:

   def test_validate
     assert_match Model::VALIDATE, 'something'
   end

That's all. Don't build everything just to test the Regexp - just test it 
directly!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to