1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Added some docs on ActiveResource::HttpMock

This commit is contained in:
Sebastian Martinez 2011-05-01 15:59:27 -03:00
parent 825dae1f0b
commit 06b9138188

View file

@ -299,6 +299,8 @@ module ActiveResource
end
end
# Returns true if code is 2xx,
# false otherwise.
def success?
code.in?(200..299)
end
@ -311,6 +313,8 @@ module ActiveResource
headers[key] = value
end
# Returns true if the other is a Response with an equal body, equal message
# and equal headers. Otherwise it returns false.
def ==(other)
if (other.is_a?(Response))
other.body == body && other.message == message && other.headers == headers