Skip to content

Commit

Permalink
chore(test): only skip rack app 404 test on rack version 2
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed Nov 29, 2024
1 parent 4234d4c commit 58f74fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/rack_reverse_proxy/middleware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Middleware

def initialize(app = nil, &b)
@app = app || lambda { |_| [404, ENV['RACK_VERSION'] == '2' ? [] : {}, []] }
@rules = []
@rules = []
@global_options = DEFAULT_OPTIONS
instance_eval(&b) if block_given?
end
Expand Down
2 changes: 1 addition & 1 deletion spec/rack/reverse_proxy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ def app
end
end

describe "as a rack app", skip: true do
describe "as a rack app", skip: ENV['RACK_VERSION'] == "2" do
it "responds with 404 when the path is not matched" do
get "/"
expect(last_response).to be_not_found
Expand Down

0 comments on commit 58f74fa

Please sign in to comment.