Skip to content

Commit

Permalink
Update Server test
Browse files Browse the repository at this point in the history
  • Loading branch information
twalpole committed Jan 20, 2021
1 parent 6440e5c commit a08e047
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions spec/server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,12 @@
expect(options.fetch(:environment)).to be_a(String)
method.call(app, events, options)
end
described_class.new(app_proc).boot
expect(Puma::Server).to have_received(:new)
server = described_class.new(app_proc).boot
expect(Puma::Server).to have_received(:new).with(
anything,
anything,
satisfy { |opts| opts.final_options[:Port] == server.port }
)
ensure
Capybara.server = :default
end
Expand Down

0 comments on commit a08e047

Please sign in to comment.