diff --git a/Formula/r/rails-new.rb b/Formula/r/rails-new.rb index f6dc24c22fdc2..bb5e011797075 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