Skip to content

Commit 347731e

Browse files
committed
test Spring.quite config
1 parent 4dd5e03 commit 347731e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/spring/test/acceptance_test.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,19 @@ def without_gem(name)
9494
refute app.spring_env.server_running?
9595
end
9696

97+
test "tells the user that spring is being used when used automatically via binstubs" do
98+
assert_success "bin/rails runner ''", stdout: "Running via Spring preloader in process"
99+
assert_success app.spring_test_command, stdout: "Running via Spring preloader in process"
100+
end
101+
102+
test "does not tell the user that spring is being used when used automatically via binstubs but quiet is enabled" do
103+
File.write("#{app.user_home}/.spring.rb", "Spring.quiet = true")
104+
assert_success "bin/rails runner ''"
105+
artifacts = app.run("bin/rails runner ''")
106+
assert !artifacts[:stdout].include?("Running via Spring preloader in process"),
107+
"expected stdout to not include 'Running via Spring preloader in process'.\n\n#{app.debug(artifacts)}"
108+
end
109+
97110
test "test changes are picked up" do
98111
assert_speedup do
99112
assert_success app.spring_test_command, stdout: "0 failures"

0 commit comments

Comments
 (0)