On 2 May 2011, at 18:04, "Pablo L. de Miranda" <[email protected]> wrote:
> Hi Chris,
>
> Thank your for your explanation, but I have a doubt about this. I'm
> printing the method test bellow:
> it "should create a new account" do
> lambda do
> visit new_subdomain_path
> response.should render_template('subdomains/new')
> fill_in :nome, :with => @attr[:name]
> fill_in :responsavel, :with => @attr[:responsable]
> fill_in :email, :with => @attr[:email]
> fill_in :password, :with => @attr[:password]
> fill_in :password_confirmation, :with =>
> @attr[:password_confirmation]
> click_button
> end.should change(Subdomain, :count).by(1)
> end
>
> My test recognize all the field except the password confirmation
> field, why? This is why I can't sleep, why just this field in
> particular?
Probably because that's the only attribute with a two-word name. Webrat is
matching the others based on their label (because 'email' and 'Email' match
case-insensitively), but 'password_confirmation' and 'Password confirmation' do
not match, because '_' != ' '.
Chris
>
> Thanks,
>
> Pablo
> _______________________________________________
> rspec-users mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/rspec-users
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users