def self.rails_integration_test(integration_test, options = {})
t = Crawler.new
t.max_url_length = options[:max_url_length] if options[:max_url_length]
t.proxy = RailsIntegrationProxy.new(integration_test)
t.handlers << HtmlDocumentHandler.new(t)
t.handlers << InvalidHtmlHandler.new
t.log_grabber = Relevance::Tarantula::LogGrabber.new(File.join(rails_root, "log/test.log"))
t.skip_uri_patterns << /logout$/
t.transform_url_patterns += [
[/\?\d+$/, ''],
[/^http:\/\/#{integration_test.host}/, '']
]
t.test_name = t.proxy.integration_test.method_name
t.reporters << Relevance::Tarantula::HtmlReporter.new(t.report_dir)
t
end