[Rails] Is a bad practice to do this while testing with Rspec?

2011-08-28 Thread Ezequiel Schwartzman
I'm testing the validation of emails so I did the following: it 'should only allow domains names with numbers, letters, dots or dashes' do (%-\\|!#$\%/()=?¡;,:{}+'°+*[]¬~^@áéíóú´`_ -).each_char do |c| Factory.build(:user, :email = zequez@gm#{c}ail.com).should_not be_valid

Re: [Rails] Is a bad practice to do this while testing with Rspec?

2011-08-28 Thread David Kahn
On Sun, Aug 28, 2011 at 10:29 AM, Ezequiel Schwartzman li...@ruby-forum.com wrote: I'm testing the validation of emails so I did the following: it 'should only allow domains names with numbers, letters, dots or dashes' do (%-\\|!#$\%/()=?¡;,:{}+'°+*[]¬~^@áéíóú´`_ -).each_char do |c|