Sha256: 1d629fc2fe2da64e303563b07e0ddb3b0659a918872703e5bdc70c4b36862079

Contents?: true

Size: 707 Bytes

Versions: 3

Compression:

Stored size: 707 Bytes

Contents

require "helper"

class TestPrettyPrint < MiniTest::Unit::TestCase
  def setup
    @agent = Mechanize.new
  end

  def test_pretty_print
    @agent.get("http://localhost/tc_pretty_print.html")
    pretty_string = @agent.pretty_print_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 #<Mechanize::Page::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

3 entries across 3 versions & 3 rubygems

Version Path
aai10-mechanize-2.0.1.0 test/test_pretty_print.rb
neocoin-mechanize-2.0.2 test/test_pretty_print.rb
mechanize-2.0.1 test/test_pretty_print.rb