Skip to content

Commit 45654d6

Browse files
committed
Add test for BUILD_COMMAND environment variable override
1 parent 02ae43b commit 45654d6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/spec/config_spec.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,18 @@
2727
end
2828
end
2929
end
30+
31+
it 'respects BUILD_COMMAND environment variable override' do
32+
new_default_hatchet_runner('lein-2.x-with-uberjar').tap do |app|
33+
app.before_deploy do
34+
app.set_config('BUILD_COMMAND' => 'echo "Custom build command executed" && lein deps')
35+
end
36+
37+
app.deploy do
38+
expect(clean_output(app.output)).to include('Running: echo "Custom build command executed" && lein deps')
39+
expect(clean_output(app.output)).to include('Custom build command executed')
40+
expect(clean_output(app.output)).not_to include('Running: lein uberjar')
41+
end
42+
end
43+
end
3044
end

0 commit comments

Comments
 (0)