Sha256: 8bfab97c6eac93f628055155fdcf9acef3f87a8244a1cd5b48d7d462afecc61e

Contents?: true

Size: 791 Bytes

Versions: 9

Compression:

Stored size: 791 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'

class DevServerTest < ViteRails::Test
  def test_running?
    refute ViteRails.dev_server.running?
  end

  def test_host
    with_rails_env('development') do
      assert_equal ViteRails.config.host, 'localhost'
    end
  end

  def test_port
    with_rails_env('development') do
      assert_equal ViteRails.config.port, 3035
    end
  end

  def test_https?
    with_rails_env('development') do
      assert_equal ViteRails.config.https, false
    end
  end

  def test_protocol
    with_rails_env('development') do
      assert_equal ViteRails.config.protocol, 'http'
    end
  end

  def test_host_with_port
    with_rails_env('development') do
      assert_equal ViteRails.config.host_with_port, 'localhost:3035'
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
vite_rails-1.0.8 test/dev_server_test.rb
vite_rails-1.0.7 test/dev_server_test.rb
vite_rails-1.0.6 test/dev_server_test.rb
vite_rails-1.0.5 test/dev_server_test.rb
vite_rails-1.0.4 test/dev_server_test.rb
vite_rails-1.0.3 test/dev_server_test.rb
vite_rails-1.0.2 test/dev_server_test.rb
vite_rails-1.0.1 test/dev_server_test.rb
vite_rails-1.0.0 test/dev_server_test.rb