Skip to content

Commit 3b07a00

Browse files
committedMar 6, 2025
Fix tests for Rails main
1 parent 09b4967 commit 3b07a00

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎test/ruby_lsp_rails/runner_client_test.rb

+6-1
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,16 @@ class RunnerClientTest < ActiveSupport::TestCase
3333

3434
test "#model returns information for the requested model" do
3535
# These columns are from the schema in the dummy app: test/dummy/db/schema.rb
36+
default_age = if Gem::Version.new(::Rails.version) >= Gem::Version.new("8.0.1")
37+
0
38+
else
39+
"0"
40+
end
3641
columns = [
3742
["id", "integer", nil, false],
3843
["first_name", "string", "", true],
3944
["last_name", "string", nil, true],
40-
["age", "integer", "0", true],
45+
["age", "integer", default_age, true],
4146
["created_at", "datetime", nil, false],
4247
["updated_at", "datetime", nil, false],
4348
["country_id", "integer", nil, false],

0 commit comments

Comments
 (0)
Failed to load comments.