Tweak specdocs
This commit is contained in:
parent
f651addbf4
commit
cff0c1b74f
@ -44,25 +44,25 @@ describe "field_labeled" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
describe "finding a text field" do
|
describe "finding a text field" do
|
||||||
using_this_html <<-EOS
|
using_this_html <<-HTML
|
||||||
<form>
|
<form>
|
||||||
<label for="element_42">The Label</label>
|
<label for="element_42">The Label</label>
|
||||||
<input type="text" id="element_42">
|
<input type="text" id="element_42">
|
||||||
</form>
|
</form>
|
||||||
EOS
|
HTML
|
||||||
|
|
||||||
should_return_a Webrat::TextField, :for => "The Label"
|
should_return_a Webrat::TextField, :for => "The Label"
|
||||||
with_an_id_of "element_42", :for => "The Label"
|
with_an_id_of "element_42", :for => "The Label"
|
||||||
should_raise_error_matching /Could not find .* "Other Label"/, :for => "Other Label"
|
should_raise_error_matching /Could not find .* "Other Label"/, :for => "Other Label"
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "finding a text field" do
|
describe "finding a hidden field" do
|
||||||
using_this_html <<-EOS
|
using_this_html <<-HTML
|
||||||
<form>
|
<form>
|
||||||
<label for="element_42">The Label</label>
|
<label for="element_42">The Label</label>
|
||||||
<input type="hidden" id="element_42">
|
<input type="hidden" id="element_42">
|
||||||
</form>
|
</form>
|
||||||
EOS
|
HTML
|
||||||
|
|
||||||
should_return_a Webrat::HiddenField, :for => "The Label"
|
should_return_a Webrat::HiddenField, :for => "The Label"
|
||||||
with_an_id_of "element_42", :for => "The Label"
|
with_an_id_of "element_42", :for => "The Label"
|
||||||
@ -70,12 +70,12 @@ describe "field_labeled" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
describe "finding a checkbox" do
|
describe "finding a checkbox" do
|
||||||
using_this_html <<-EOS
|
using_this_html <<-HTML
|
||||||
<form>
|
<form>
|
||||||
<label for="element_42">The Label</label>
|
<label for="element_42">The Label</label>
|
||||||
<input type="checkbox" id="element_42">
|
<input type="checkbox" id="element_42">
|
||||||
</form>
|
</form>
|
||||||
EOS
|
HTML
|
||||||
|
|
||||||
should_return_a Webrat::CheckboxField, :for => "The Label"
|
should_return_a Webrat::CheckboxField, :for => "The Label"
|
||||||
with_an_id_of "element_42", :for => "The Label"
|
with_an_id_of "element_42", :for => "The Label"
|
||||||
@ -83,12 +83,12 @@ describe "field_labeled" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
describe "finding a radio button" do
|
describe "finding a radio button" do
|
||||||
using_this_html <<-EOS
|
using_this_html <<-HTML
|
||||||
<form>
|
<form>
|
||||||
<label for="element_42">The Label</label>
|
<label for="element_42">The Label</label>
|
||||||
<input type="radio" id="element_42">
|
<input type="radio" id="element_42">
|
||||||
</form>
|
</form>
|
||||||
EOS
|
HTML
|
||||||
|
|
||||||
should_return_a Webrat::RadioField, :for => "The Label"
|
should_return_a Webrat::RadioField, :for => "The Label"
|
||||||
with_an_id_of "element_42", :for => "The Label"
|
with_an_id_of "element_42", :for => "The Label"
|
||||||
@ -97,12 +97,12 @@ describe "field_labeled" do
|
|||||||
|
|
||||||
|
|
||||||
describe "finding a text area" do
|
describe "finding a text area" do
|
||||||
using_this_html <<-EOS
|
using_this_html <<-HTML
|
||||||
<form>
|
<form>
|
||||||
<label for="element_42">The Label</label>
|
<label for="element_42">The Label</label>
|
||||||
<textarea id="element_42"></textarea>
|
<textarea id="element_42"></textarea>
|
||||||
</form>
|
</form>
|
||||||
EOS
|
HTML
|
||||||
|
|
||||||
should_return_a Webrat::TextareaField, :for => "The Label"
|
should_return_a Webrat::TextareaField, :for => "The Label"
|
||||||
with_an_id_of "element_42", :for => "The Label"
|
with_an_id_of "element_42", :for => "The Label"
|
||||||
|
Loading…
Reference in New Issue
Block a user