0
我想让webrat从列表中选择一个单选按钮,使用黄瓜。黄瓜&网络,从单选按钮列表中选择
我有这样的场景:
Scenario: Update an existing article
Given I have an article with title Big Bananas and body text Big yellow bananas are good for you
And I am on the list of articles
When I choose "Big Bananas"
And press "Update article"
And I fill in "Title" with "Massive Bananas"
And I press "Save"
Then I should have an article titled Massive Bananas
And I should not have an article titled Big Bananas
我的视图包含:
.
.
<% @articles.each do |article| %>
<tr>
<td><%= radio_button_tag "article", article.title %></td>
<td><%= article.title %></td>
<td>
<%article.tags.each do |tag|%>
<div><%= tag.name %></div>
<%end%>
</td>
</tr>
<%end%>
.
.
的问题是,我需要我的单选按钮ID是文章的标题这样的网络老鼠可以挑它从我的黄瓜场景,目前我的产品的输出看起来像这样:
<tr>
<td><input id="article_big_bananas" name="article" type="radio" value="Big Bananas" /></td>
<td>Big Bananas</td>
<td>
<div>fruit</div>
<div>yellow</div>
</td>
</tr>
任何想法我应该怎么做?
'当我选择“article_big_bananas”'不起作用? – jdl 2010-09-06 22:05:07