vendor/plugins/assert_request/test/functional/assert_request_test.rb
def assert_valid_request(method, url, *args)
    # We need to dup our args, since assert_response seems to add an extra
    # :only_path key to the hash. This looks like a rails bug.
    if args.first
      args2 = [args.first.dup]
    else
      args2 = args.dup
    end
      
    self.send(method.to_s, url.to_s, *args)
    assert_response :success
  rescue AssertRequest::RequestError => e
    flunk "Received a RequestError exception, but wasn't expecting one: <#{e}>"
  end
# Works like "get" or "post", only it also asserts that the request was 
# successfully validated.
Works like "get" or "post", only it also asserts that the request was
successfully validated.
Works like " get " or " post " only it also asserts that the request was successfully validated .
def assert_valid_request(method, url, *args)
    if args.first
      args2 = [args.first.dup]
    else
      args2 = args.dup
    end
    self.send(method.to_s, url.to_s, *args)
    assert_response :success
  rescue AssertRequest::RequestError => e
    flunk "Received a RequestError exception, but wasn't expecting one: <#{e}>"
  end
def assert_valid_request ( method , url , * args ) if args . first args2 = [ args . first . dup ] else args2 = args . dup end self . send ( method . to_s , url . to_s , * args ) assert_response :success rescue AssertRequest :: RequestError => e flunk "Received a RequestError exception, but wasn't expecting one: <#{e}>" end
Works like "get" or "post", only it also asserts that the request was
successfully validated.
Works like " get " or " post " only it also asserts that the request was successfully validated .
# We need to dup our args, since assert_response seems to add an extra # :only_path key to the hash. This looks like a rails bug.
method
url
args