diff options
author | Jeremy Evans <code@jeremyevans.net> | 2022-02-03 13:20:12 -0800 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2022-02-03 16:35:50 -0800 |
commit | 2833813bd7f2a1872831d83cc9a0bb60f7d94fdd (patch) | |
tree | 74c1cb61a6e6fe4810f24ba795744f1ec693719e /test/spec_multipart.rb | |
parent | 568dee5a2de80a9da20e2baf084b215abeee4ea8 (diff) | |
download | rack-2833813bd7f2a1872831d83cc9a0bb60f7d94fdd.tar.gz |
Enable directly requiring Rack components
Add test:separate task to test run each test file separately.
This is to test that directly requiring a rack component will work.
With test:separate, the test helper will not require rack, and each
test file should call separate_testing with a block that uses
require_relative to only require that component being tested.
Add the appropriate relative requires to get all tests passing
when run separately.
Note that this isn't foolproof. In many cases, the tests use
Rack components that are not under test (such as lint and mock),
and both of those other other rack components, so it's possible
the tests are loading hidden dependencies. I attempted to check
each component to try to find the hidden dependencies, but it is
certainly possible I missed something.
Implements #1621.
Diffstat (limited to 'test/spec_multipart.rb')
-rw-r--r-- | test/spec_multipart.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/spec_multipart.rb b/test/spec_multipart.rb index 87902a1f..ad7c1ca5 100644 --- a/test/spec_multipart.rb +++ b/test/spec_multipart.rb @@ -3,6 +3,14 @@ require_relative 'helper' require 'timeout' +separate_testing do + require_relative '../lib/rack/multipart' + require_relative '../lib/rack/lint' + require_relative '../lib/rack/mock' + require_relative '../lib/rack/query_parser' + require_relative '../lib/rack/utils' +end + describe Rack::Multipart do def multipart_fixture(name, boundary = "AaB03x") file = multipart_file(name) |