Sha256: caeb6b73e78e86f97e9818c3deff8da5b0083e05370d04718b76a101fc36d626

Contents?: true

Size: 911 Bytes

Versions: 47

Compression:

Stored size: 911 Bytes

Contents

# frozen_string_literal: true

require "abstract_unit"
require "capybara/dsl"
require "action_dispatch/system_testing/server"

class ServerTest < ActiveSupport::TestCase
  setup do
    @old_capybara_server = Capybara.server
  end

  test "port is always included" do
    ActionDispatch::SystemTesting::Server.new.run
    assert Capybara.always_include_port, "expected Capybara.always_include_port to be true"
  end

  test "server is changed from `default` to `puma`" do
    Capybara.server = :default
    ActionDispatch::SystemTesting::Server.new.run
    refute_equal Capybara.server, Capybara.servers[:default]
  end

  test "server is not changed to `puma` when is different than default" do
    Capybara.server = :webrick
    ActionDispatch::SystemTesting::Server.new.run
    assert_equal Capybara.server, Capybara.servers[:webrick]
  end

  teardown do
    Capybara.server = @old_capybara_server
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
jets-1.9.7 vendor/rails/actionpack/test/dispatch/system_testing/server_test.rb
jets-1.9.6 vendor/rails/actionpack/test/dispatch/system_testing/server_test.rb
jets-1.9.5 vendor/rails/actionpack/test/dispatch/system_testing/server_test.rb
jets-1.9.4 vendor/rails/actionpack/test/dispatch/system_testing/server_test.rb
jets-1.9.3 vendor/rails/actionpack/test/dispatch/system_testing/server_test.rb
jets-1.9.2 vendor/rails/actionpack/test/dispatch/system_testing/server_test.rb
jets-1.9.1 vendor/rails/actionpack/test/dispatch/system_testing/server_test.rb
jets-1.9.0 vendor/rails/actionpack/test/dispatch/system_testing/server_test.rb
jets-1.8.14 vendor/rails/actionpack/test/dispatch/system_testing/server_test.rb
jets-1.8.13 vendor/rails/actionpack/test/dispatch/system_testing/server_test.rb
jets-1.8.12 vendor/rails/actionpack/test/dispatch/system_testing/server_test.rb
jets-1.8.11 vendor/rails/actionpack/test/dispatch/system_testing/server_test.rb
jets-1.8.10 vendor/rails/actionpack/test/dispatch/system_testing/server_test.rb
jets-1.8.9 vendor/rails/actionpack/test/dispatch/system_testing/server_test.rb
jets-1.8.8 vendor/rails/actionpack/test/dispatch/system_testing/server_test.rb
jets-1.8.7 vendor/rails/actionpack/test/dispatch/system_testing/server_test.rb
jets-1.8.6 vendor/rails/actionpack/test/dispatch/system_testing/server_test.rb
jets-1.8.5 vendor/rails/actionpack/test/dispatch/system_testing/server_test.rb
jets-1.8.4 vendor/rails/actionpack/test/dispatch/system_testing/server_test.rb
jets-1.8.3 vendor/rails/actionpack/test/dispatch/system_testing/server_test.rb