From 724dac29ba604da9c137dcd20027d1e4d1e1321b Mon Sep 17 00:00:00 2001 From: Robert Mosolgo Date: Mon, 9 Dec 2024 15:16:48 -0500 Subject: [PATCH] Add test for requiring graphql first --- spec/graphql/autoload_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/graphql/autoload_spec.rb b/spec/graphql/autoload_spec.rb index a64620bd8f..a2dc632e43 100644 --- a/spec/graphql/autoload_spec.rb +++ b/spec/graphql/autoload_spec.rb @@ -55,6 +55,8 @@ def self.eager_load! require_path = file.sub("lib/", "").sub(".rb", "") stderr_and_stdout, _status = Open3.capture2e("ruby -Ilib -e 'require \"#{require_path}\"'") assert_equal "", stderr_and_stdout, "It loads #{require_path.inspect} in isolation" + stderr_and_stdout, _status = Open3.capture2e("ruby -Ilib -e 'require \"graphql\"; require \"#{require_path}\"'") + assert_equal "", stderr_and_stdout, "It loads #{require_path.inspect} in isolation after loading graphql" end end end