Need help in View Spec
Hello everyone:
I am kind of puzzled in writing spec on view partials. I can not find much information about the "should have_tag" syntax in Rspec. Can rspec test a particular attribute of a tag (e.g. input tag)? Let me put an example here:
#../view/group/_index
<div id="test">
<input type="button" value="update" onclick="update()" />
</div>
I want to test the "onclick" attribute in the input tag, which ensure that clicking the button will call the correct Javascript method. How should I do?
Great thanks for any help.