rspec and capybara "should find" shorthand -


is there shorthand find there have_selector?

for example can write:

it { should have_selector('h1', text: 'welcome')  } 

is there similar shorthand following?

it "should have blank customer input"   find_field('customername').value.should be_blank  end 

i think there no shorthand shorthands rspec matchers.

you can't have_field since doesn't support attributes.

there have_css matcher:

it { should have_css("#customername[value='']") } 

but won't check value if changed after page loaded.

other rspec matchers don't have ability assert attributes too.


Comments