Closed nicolasblanco closed 12 years ago
I'll check & fix
$ cat test_builder.rb require 'rubygems' require 'builder' builder = Builder::XmlMarkup.new(:indent => 2) builder.html do |xml| xml.body do |xml| xml.textarea("", :cols => 40, :rows => 10, :name => 'data') xml.p do |xml| xml.input(:type => 'submit', :value => "Update") end end end data = builder.target! puts data
Hi and thanks for looking for this strange issue.
The generated output of the test file looks fine. As I said, the HTML output is only bad when using js: true in my test. My tests which don't use JS works great with rack_session_access.
[$]nicolas@MacBook-Air-de-Nicolas-Blanco:[git:master?] /Users/nicolas/projects/simplib-> bundle exec ruby test_builder.rb
<html>
<body>
<textarea cols="40" rows="10" name="data"/>
<p>
<input type="submit" value="Update"/>
</p>
</body>
</html>
[$]nicolas@MacBook-Air-de-Nicolas-Blanco:[git:master?] /Users/nicolas/projects/simplib-> bundle show builder
/Users/nicolas/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/builder-3.0.3
released v0.0.3
Hi,
when enabling js in my integration test (using js: true) and capybara-webkit like this :
The test fails with :
I've taken a look at the generated update session page HTML and it contains some weird HTML escape but only some parts of the form seem escaped (very weird) :
Have you got some ideas?
Thanks.
Using : rails 2.3.8 / capybara 1.1.2 / capybara-screenshot 0.2.2 / capybara-webkit 0.12.1