Hi!
I''m making my first app using BDD. I''m using RSpec with Steak
for
acceptance tests and Capybara.
It is a good idea to test all views, for example login or sign up
form, to check if all the inputs are rendered, if password input is of
type="password" etc.? Or rather while doing BDD it is not practiced to
write also views specs?
And if yes, how can we test views, to check for example for existence
of some input? I see that Capybara have method such as has_selector?,
but unfortunately it didn''t work in views specs. I think that testing
views by only contains?() method could be uncomfortable, for example
to check for password field we would write:
rendered.should contain(''<input type="password"
name="user[password]" />''), but it won''t work, if that input have for example some
css
class...
So, what are the practices in BDD on testing views?
cheers
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.