diff options
author | Sebastian Martinez <sebastian@wyeworks.com> | 2011-05-01 15:59:27 -0300 |
---|---|---|
committer | Sebastian Martinez <sebastian@wyeworks.com> | 2011-05-01 15:59:27 -0300 |
commit | 06b91381889fcbd32018ab045b1795ada8718cad (patch) | |
tree | 5eed5a93ce17d574ca1adb27229f1d835bfef927 | |
parent | 825dae1f0b32bac0e5afde61578534d1a3df8b7b (diff) | |
download | rails-06b91381889fcbd32018ab045b1795ada8718cad.tar.gz rails-06b91381889fcbd32018ab045b1795ada8718cad.tar.bz2 rails-06b91381889fcbd32018ab045b1795ada8718cad.zip |
Added some docs on ActiveResource::HttpMock
-rw-r--r-- | activeresource/lib/active_resource/http_mock.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activeresource/lib/active_resource/http_mock.rb b/activeresource/lib/active_resource/http_mock.rb index 02b1192d7e..3bfd536b29 100644 --- a/activeresource/lib/active_resource/http_mock.rb +++ b/activeresource/lib/active_resource/http_mock.rb @@ -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 |