Permalink
Browse files

fix for wacky document parsing under jruby

  • Loading branch information...
1 parent d2d1153 commit e3f3fbc45b2ff149b7c7fe79d3636a93095a66d9 @twalpole committed Mar 14, 2013
Showing with 13 additions and 9 deletions.
  1. +1 −1 lib/capybara/spec/session/find_field_spec.rb
  2. +12 −8 lib/capybara/spec/views/form.erb
@@ -87,7 +87,7 @@
context "inside non-first legend" do
it "should not find fields when false" do
expect do
- r=@session.find_field("Disabled Fieldset Legend2 Checkbox", :disabled => false)
+ @session.find_field("Disabled Fieldset Legend2 Checkbox", :disabled => false)
end.to raise_error(Capybara::ElementNotFound)
end
it "should find fields when true" do
@@ -405,16 +405,20 @@
<form action="/form" method="post">
<fieldset id="disabled_fieldset" disabled="disabled">
<legend>
- <label>
- Disabled Fieldset Legend Checkbox
- <input type="checkbox" name="form[legend_checkbox]" value="Should see me" checked="checked" />
- </label>
+ <p>
+ <label>
+ Disabled Fieldset Legend Checkbox
+ <input type="checkbox" name="form[legend_checkbox]" value="Should see me" checked="checked" />
+ </label>
+ </p>
</legend>
<legend>
- <label>
- Disabled Fieldset Legend2 Checkbox
- <input type="checkbox" name="form[legend2_checkbox]" value="Should see me" checked="checked" />
- </label>
+ <p>
+ <label>
+ Disabled Fieldset Legend2 Checkbox
+ <input type="checkbox" name="form[legend2_checkbox]" value="Should see me" checked="checked" />
+ </label>
+ </p>
</legend>
<p>
<label for="form_disabled_fieldset_checkbox">

0 comments on commit e3f3fbc

Please sign in to comment.