Skip to content

Instantly share code, notes, and snippets.

@svenfuchs
Created June 1, 2010 11:28
Show Gist options
  • Save svenfuchs/420825 to your computer and use it in GitHub Desktop.
Save svenfuchs/420825 to your computer and use it in GitHub Desktop.
test "ruby: innerHTML=" do
div = document.getElementsByTagName('//div').first
div.inner_html = '<div><span>hi</span> there</div>'
assert_equal "<div><span>hi</span> there</div>", div.innerHTML
end
# =>
# 1) Failure:
# test_ruby:_innerHTML=(ElementTest) [test/rdom/element_test.rb:35]:
# <"<div><span>hi</span> there</div>"> expected but was
# <"<div>\n<span>hi</span> there</div>">.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment