Skip to content

Commit

Permalink
rails-new: update test
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Chen <rui@chenrui.dev>
  • Loading branch information
chenrui333 committed Jan 18, 2025
1 parent edd6d57 commit c787ce6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Formula/r/rails-new.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c787ce6

Please sign in to comment.