test/test_scheme.rb in mechanize-1.0.0 vs test/test_scheme.rb in mechanize-1.0.1.beta.20110107104205

- old
+ new

@@ -28,9 +28,16 @@ page = @agent.get("file://#{f}") assert_equal(Dir[File.join(f, '*')].length, page.links.length) assert_kind_of(Mechanize::Page, page) end + def test_file_scheme_with_embedded_spaces + f = File.expand_path(File.join(File.dirname(__FILE__), "htdocs/dir with spaces/foo.html")) + page = @agent.get("file://#{f}") + assert_equal(File.read(f), page.body) + assert_kind_of(Mechanize::Page, page) + end + def test_click_file_link f = File.expand_path(File.join(File.dirname(__FILE__), "htdocs")) page = @agent.get("file://#{f}") link = page.links.find { |l| l.text =~ /tc_follow_meta/ } assert_not_nil(link)