# File lib/ruby_toggle_file.rb, line 23
  def test_file(implementation)
    if m = LIB_RE.match(implementation)
      dir, node = File.split m[1]
      dir = (dir == '.') ? nil : dir+"/"
    else
      dir = node = nil
    end
    run_hooks_with_args_until_success %r/^test_file_/, implementation, m&&(m.pre_match+"/"), dir, node
  end