From c787ce6af86ffa0ddc30cdb9c3ee48be07839e7a Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Sat, 18 Jan 2025 10:45:20 -0500 Subject: [PATCH] rails-new: update test Signed-off-by: Rui Chen --- Formula/r/rails-new.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Formula/r/rails-new.rb b/Formula/r/rails-new.rb index f6dc24c22fdc27..bb5e0117970752 100644 --- a/Formula/r/rails-new.rb +++ b/Formula/r/rails-new.rb @@ -7,15 +7,18 @@ class RailsNew < Formula head "https://github.com/rails/rails-new.git", branch: "main" depends_on "rust" => :build + depends_on "docker" => :test def install system "cargo", "install", *std_cargo_args end test do + ENV["DOCKER_HOST"] = "unix://#{testpath}/invalid.sock" + assert_match version.to_s, shell_output("#{bin}/rails-new --version") output = shell_output("#{bin}/rails-new testapp 2>&1", 101) - assert_match "failed to fetch metadata", output + assert_match "Cannot connect to the Docker daemon", output end end