From 0bc27c10cc723a3dd6c2ca0bd51370ba72025a19 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 14 May 2024 11:59:42 -0700 Subject: [PATCH] Fix tests --- test/cli/main_test.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/cli/main_test.rb b/test/cli/main_test.rb index 6c7c0f24..6149cf0b 100644 --- a/test/cli/main_test.rb +++ b/test/cli/main_test.rb @@ -444,6 +444,7 @@ class CliMainTest < CliTestCase <% end -%> EOF + Pathname.any_instance.expects(:exist?).returns(true).times(3) File.expects(:read).with(".env.erb").returns(file.strip) File.expects(:write).with(".env", "HELLO=world\nKEY=value\n", perm: 0600) @@ -451,6 +452,7 @@ class CliMainTest < CliTestCase end test "envify with destination" do + Pathname.any_instance.expects(:exist?).returns(true).times(4) File.expects(:read).with(".env.world.erb").returns("HELLO=<%= 'world' %>") File.expects(:write).with(".env.world", "HELLO=world", perm: 0600) @@ -458,6 +460,7 @@ class CliMainTest < CliTestCase end test "envify with skip_push" do + Pathname.any_instance.expects(:exist?).returns(true).times(1) File.expects(:read).with(".env.erb").returns("HELLO=<%= 'world' %>") File.expects(:write).with(".env", "HELLO=world", perm: 0600)