configuration block for tarantula_crawl
jeffp opened this issue · 2 comments
jeffp commented
would like to add a configuration block for this method...
def tarantula_crawl(integration_test, options = {}, &block)
url = options[:url] || "/"
t = tarantula_crawler(integration_test, options)
yield(t) if block_given?
t.crawl url
end
cldwalker commented
The way #tarantula_crawl is defined you can build this behavior into your own test suite:
module MyTarantulaCrawler
def tarantula_crawler(*)
super.tap do |crawler|
# custom config block goes here
end
end
end
ActionController::IntegrationTest.send :include, MyTarantulaCrawler
If this doesn't work for your scenario, I need more context to understand why the block is needed here.
cldwalker commented
Closing. Feel free to reopen if still an issue.