Skip to content

Commit

Permalink
Fix tests for Windows compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
andyw8 committed Mar 25, 2024
1 parent 54aa985 commit 1fd5fef
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/configuration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ class ConfigurationTest < Minitest::Test
def test_returns_empty_hash_when_no_configuration_files_exist
FileUtils.mv(".ruby-lsp.yml", ".ruby-lsp.yml.tmp")
workspace_uri = URI::Generic.build(scheme: "file", host: nil, path: "/path/to/workspace")

result = RubyLsp::Configuration.new(workspace_uri).indexing

assert_empty(result)
Expand All @@ -22,7 +21,7 @@ def test_supports_depecated_index_configuration_file
excluded_patterns:
- "**/test/fixtures/**/*.rb"
YAML
workspace_uri = URI::Generic.build(scheme: "file", host: nil, path: Dir.pwd)
workspace_uri = URI::Generic.from_path(path: Dir.pwd)

result = RubyLsp::Configuration.new(workspace_uri).indexing

Expand All @@ -33,7 +32,7 @@ def test_supports_depecated_index_configuration_file
end

def test_supports_newer_configuration
workspace_uri = URI::Generic.build(scheme: "file", host: nil, path: Dir.pwd)
workspace_uri = URI::Generic.from_path(path: Dir.pwd)

result = RubyLsp::Configuration.new(workspace_uri).indexing

Expand All @@ -46,7 +45,7 @@ def test_raises_if_indexing_key_is_missing
excluded_patterns:
- "**/test/fixtures/**/*.rb"
YAML
workspace_uri = URI::Generic.build(scheme: "file", host: nil, path: Dir.pwd)
workspace_uri = URI::Generic.from_path(path: Dir.pwd)

error = assert_raises do
RubyLsp::Configuration.new(workspace_uri).indexing
Expand Down

0 comments on commit 1fd5fef

Please sign in to comment.