HEX
Server: Apache
System: Windows NT MAGNETO-ARM 10.0 build 22000 (Windows 10) AMD64
User: Michel (0)
PHP: 7.4.7
Disabled: NONE
Upload Files
File: C:/Ruby27-x64/lib/ruby/gems/2.7.0/doc/activeresource-6.0.0/ri/ActiveResource/HttpMock/requests-c.ri
U:RDoc::AnyMethod[iI"
requests:ETI"'ActiveResource::HttpMock::requests;TT:publico:RDoc::Markup::Document:@parts[	o:RDoc::Markup::Paragraph;	[I"hReturns an array of all request objects that have been sent to the mock. You can use this to check ;TI"1if your model actually sent an HTTP request.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading:
leveli	:	textI"Example;To:RDoc::Markup::Verbatim;	[I"def setup
;TI"E  @matz  = { :person => { :id => 1, :name => "Matz" } }.to_json
;TI"5  ActiveResource::HttpMock.respond_to do |mock|
;TI".    mock.get "/people/1.json", {}, @matz
;TI"  end
;TI"	end
;TI"
;TI",def test_should_request_remote_service
;TI":  person = Person.find(1)  # Call the remote service
;TI"
;TI"W  # This request object has the same HTTP method and path as declared by the mock
;TI"N  expected_request = ActiveResource::Request.new(:get, "/people/1.json")
;TI"
;TI"^  # Assert that the mock received, and responded to, the expected request from the model
;TI"K  assert ActiveResource::HttpMock.requests.include?(expected_request)
;TI"end;T:@format0:
@fileI"%lib/active_resource/http_mock.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@$FI"
HttpMock;TcRDoc::NormalClass00