relevance/tarantula

configuration block for tarantula_crawl

jeffp opened this issue · 2 comments

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

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.

Closing. Feel free to reopen if still an issue.