We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
apply
check
1 parent 8210e6c commit 2605981Copy full SHA for 2605981
test/serverkit/resources/test_mise_install.rb
@@ -0,0 +1,27 @@
1
+# frozen_string_literal: true
2
+
3
+require "test_helper"
4
5
+class Serverkit::Resources::TestMiseInstall < Minitest::Test
6
+ ATTRIBUTES = {"name" => "test"}
7
8
+ def setup
9
+ @resource = Serverkit::Resources::MiseInstall.new({}, ATTRIBUTES)
10
+ end
11
12
+ def test_resource_instance
13
+ assert_instance_of Serverkit::Resources::MiseInstall, @resource
14
15
16
+ def test_apply
17
+ @resource.stub :run_command, ->(cmd) { cmd } do
18
+ assert_equal("mise install test", @resource.apply)
19
20
21
22
+ def test_check
23
+ @resource.stub :check_command, ->(cmd) { cmd } do
24
+ assert_equal('mise ls test | grep "$(mise latest test)"', @resource.check)
25
26
27
+end
0 commit comments