Skip to content

Commit

Permalink
Clean up tests (#2387)
Browse files Browse the repository at this point in the history
* No need in assigning the output of `connect` when it's only used
  in one place.
* Remove inlined config in favor of config file introduced in 39f9c72
  • Loading branch information
bradleyprice committed Sep 27, 2020
1 parent 1a9849c commit ae21600
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
21 changes: 2 additions & 19 deletions test/test_integration_cluster.rb
Expand Up @@ -222,25 +222,8 @@ def test_nakayoshi
end

def test_prune_bundler_with_multiple_workers
cli_server "", config: <<RUBY
require 'bundler/setup'
Bundler.setup
prune_bundler true
workers 2
app do |env|
[200, {}, ["embedded app"]]
end
lowlevel_error_handler do |err|
[200, {}, ["error page"]]
end
RUBY

connection = connect
reply = read_body(connection)
cli_server "-C test/config/prune_bundler_with_multiple_workers.rb"
reply = read_body(connect)

assert reply, "embedded app"
end
Expand Down
3 changes: 1 addition & 2 deletions test/test_integration_single.rb
Expand Up @@ -47,8 +47,7 @@ def test_prefer_rackup_file_specified_by_cli
skip_unless_signal_exist? :TERM

cli_server "-C test/config/with_rackup_from_dsl.rb test/rackup/hello.ru"
connection = connect
reply = read_body(connection)
reply = read_body(connect)
stop_server

assert_match("Hello World", reply)
Expand Down

0 comments on commit ae21600

Please sign in to comment.