diff options
author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2022-08-03 14:28:08 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-03 14:28:08 +1200 |
commit | 75fff851b46a2ada897eaa9dca74812592c39aa3 (patch) | |
tree | 8ffe6fcaf558f470233e1b5538e9bebece6979b6 /test/spec_lock.rb | |
parent | 3012643ea6a89fefe8cc0c68d4992531c367c906 (diff) | |
download | rack-75fff851b46a2ada897eaa9dca74812592c39aa3.tar.gz |
Move Rack::MockRequest/Response into dedicated files. (#1935)
* Move Rack::MockRequest/Response into dedicated files. At some point I think we want to improve the implementation of `Rack::Mock` in a separate gem. So let's be consistent with naming these files to avoid clobbering namespace in the future.
Diffstat (limited to 'test/spec_lock.rb')
-rw-r--r-- | test/spec_lock.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/spec_lock.rb b/test/spec_lock.rb index 3980fc98..dfc07449 100644 --- a/test/spec_lock.rb +++ b/test/spec_lock.rb @@ -4,7 +4,7 @@ require_relative 'helper' separate_testing do require_relative '../lib/rack/lock' - require_relative '../lib/rack/mock' + require_relative '../lib/rack/mock_request' require_relative '../lib/rack/lint' end @@ -84,11 +84,11 @@ describe Rack::Lock do it 'call super on close' do env = Rack::MockRequest.env_for("/") - response = Class.new { + response = Class.new do attr_accessor :close_called def initialize; @close_called = false; end def close; @close_called = true; end - }.new + end.new app = lock_app(lambda { |inner_env| [200, { "content-type" => "text/plain" }, response] }) app.call(env) |