Sha256: a936143df0107d81bf79499875da3f2b3e05f6230075f37e9c3e9478aa845171
Contents?: true
Size: 852 Bytes
Versions: 2
Compression:
Stored size: 852 Bytes
Contents
$:.unshift File.join(File.dirname(__FILE__), "..", "lib") require 'test/unit' require 'rubygems' require 'mechanize' require 'test_includes' class TestPrettyPrint < Test::Unit::TestCase include TestMethods def setup @agent = WWW::Mechanize.new end def test_pretty_print @agent.get("http://localhost:#{PORT}/tc_pretty_print.html") pretty_string = @agent.inspect assert_match("{title \"tc_pretty_print.html\"}", pretty_string) assert_match(/\{frames[^"]*"http:\/\/meme/, pretty_string) assert_match(/\{iframes[^"]*"http:\/\/meme/, pretty_string) assert_match( "{links #<WWW::Mechanize::Link \"Google\" \"http://google.com/\">}", pretty_string ) assert_match("form1", pretty_string) assert_match("POST", pretty_string) assert_match("{file_uploads}", pretty_string) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mechanize-0.5.4 | test/tc_pretty_print.rb |
mechanize-0.5.3 | test/tc_pretty_print.rb |