diff options
author | Xavier Noria <fxn@hashref.com> | 2010-08-09 15:14:00 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-08-09 15:25:21 +0200 |
commit | 4f7565c4de1f877547a6b901a8416b18c613acc9 (patch) | |
tree | 4b38fceff3eb16aeb9a320a572351de405e0fb98 /activeresource/lib | |
parent | 505546af709082f25444e323ee0f2141a86bbc63 (diff) | |
download | rails-4f7565c4de1f877547a6b901a8416b18c613acc9.tar.gz rails-4f7565c4de1f877547a6b901a8416b18c613acc9.tar.bz2 rails-4f7565c4de1f877547a6b901a8416b18c613acc9.zip |
adds missing requires for Object#try
Diffstat (limited to 'activeresource/lib')
-rw-r--r-- | activeresource/lib/active_resource/http_mock.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/activeresource/lib/active_resource/http_mock.rb b/activeresource/lib/active_resource/http_mock.rb index f192c53b4f..75425c01c0 100644 --- a/activeresource/lib/active_resource/http_mock.rb +++ b/activeresource/lib/active_resource/http_mock.rb @@ -123,7 +123,11 @@ module ActiveResource # def post(path, body, headers) # request = ActiveResource::Request.new(:post, path, body, headers) # self.class.requests << request - # self.class.responses.assoc(request).try(:second) || raise(InvalidRequestError.new("No response recorded for #{request}")) + # if response = self.class.responses.assoc(request) + # response[1] + # else + # raise InvalidRequestError.new("No response recorded for #{request}") + # end # end module_eval <<-EOE, __FILE__, __LINE__ + 1 def #{method}(path, #{'body, ' if has_body}headers) |