Ashley Moran
2007-Jan-18 13:57 UTC
[rspec-users] Best way to specify an HTML element inside another
Hi
I know should_have is preliminary but I can''t resist using it...
I have a form that contains a date select (Rails-generated). I want
to specify that the default value for each popup menu is correct
The best I can manage is this:
response.should_have "form > p >
select[name=''quote_parameters
[purchase_date(3i)]''] >
option[selected=''selected'']", :text =>
''16''
I really want to specify two attributes for the <option> tag, like
option[selected=''selected'',value=''16''] - is
there any syntax that
allows this?
Ashley
