summary refs log tree commit
diff options
context:
space:
mode:
-rw-r--r--lib/rack/mock.rb8
-rw-r--r--lib/rack/response.rb1
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/rack/mock.rb b/lib/rack/mock.rb
index ca1a6f4e..77ef3234 100644
--- a/lib/rack/mock.rb
+++ b/lib/rack/mock.rb
@@ -141,7 +141,7 @@ module Rack
   # Usually, you don't create the MockResponse on your own, but use
   # MockRequest.
 
-  class MockResponse
+  class MockResponse < Rack::Response
     def initialize(status, headers, body, errors=StringIO.new(""))
       @status = status.to_i
 
@@ -177,11 +177,11 @@ module Rack
       @body.match other
     end
 
-
     # Errors
     attr_accessor :errors
 
-
-    include Response::Helpers
+    def empty?
+      [201, 204, 304].include? status
+    end
   end
 end
diff --git a/lib/rack/response.rb b/lib/rack/response.rb
index 32656d62..afb44ad7 100644
--- a/lib/rack/response.rb
+++ b/lib/rack/response.rb
@@ -123,7 +123,6 @@ module Rack
       def not_found?;     @status == 404;                        end
 
       def redirect?;      [301, 302, 303, 307].include? @status; end
-      def empty?;         [201, 204, 304].include?      @status; end
 
       # Headers
       attr_reader :headers, :original_headers