Hi,
suggestions how to add w3 validation to a story step?
eg
Then the page should be valid
tia
linoj
Hi,
suggestions how to add w3 validation to a story step?
eg
Then the page should be valid
tia
linoj
On Mon, Sep 15, 2008 at 5:32 PM, Jonathan L.
[email protected] wrote:
Hi,
suggestions how to add w3 validation to a story step?
eg
Then the page should be valid
You could write a “then” step that takes the current response.body,
uploads it to the w3 validator, and checks the the response. Rather
than uploading you could use the ruby tidy bindings to do offline
validation which would most likely be much faster. See
http://tidy.rubyforge.org/ for more information.
–
Zach D.
http://www.continuousthinking.com
On 15 Sep 2008, at 23:16, Zach D. wrote:
than uploading you could use the ruby tidy bindings to do offline
validation which would most likely be much faster. See
http://tidy.rubyforge.org/ for more information.
I’d love to see such a thing if you did make it.
The other day, I got around this issue (I forgot to close a tag
somewhere and the page didn’t render in safari) by writing a matcher
be_valid_xml() which just tried to load the response.body into an XML
document. That was enough to catch my bug, but this would be a great
tool to have in the box.
In case you wondered: The opinions expressed in this email are my own
and do not necessarily reflect the views of any former, current or
future employers of mine.
On Sep 15, 2008, at 6:16 PM, Zach D. wrote:
than uploading you could use the ruby tidy bindings to do offline
validation which would most likely be much faster. See
http://tidy.rubyforge.org/ for more information.
fyi, this goes out to w3
http://blogs.smarteguru.com/2008/09/rails-plugin-to-validate-xhtml-
and-css/
http://github.com/CodeMonkeySteve/assert-valid-asset/tree/master
but required i hack it to work with stories
(in file assert_valid_asset.rb#180, add line:
method_name ||= ‘story’
But also found this, which uses tidy and is significantly faster
http://blog.cosinux.org/pages/rails-tidy
http://www.cosinux.org/~dam/projects/rails-tidy/doc/
So
Then “the browser page should be valid” do
assert_tidy
end
– jonathan linowes
parkerhill technology group llc
[email protected]
office: 603-838-2884
www.parkerhill.com
blog: www.vaporbase.com
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs