aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib/active_resource/http_mock.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activeresource/lib/active_resource/http_mock.rb')
-rw-r--r--activeresource/lib/active_resource/http_mock.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/activeresource/lib/active_resource/http_mock.rb b/activeresource/lib/active_resource/http_mock.rb
index 16ac62bf13..c9a2c21f31 100644
--- a/activeresource/lib/active_resource/http_mock.rb
+++ b/activeresource/lib/active_resource/http_mock.rb
@@ -32,7 +32,12 @@ module ActiveResource
pairs.each do |(path, response)|
responses[path] = response
end
- yield Responder.new(responses) if block_given?
+
+ if block_given?
+ yield Responder.new(responses)
+ else
+ Responder.new(responses)
+ end
end
def reset!