blob: 9eaf5ac07f44ae41705908c0adf52cde9e95225b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
require 'minitest/autorun'
require 'socket'
require_relative '../../../lib/dsl'
class RCMOnlyWhenTest < Minitest::Test
def test_hostname
rcm = configure(reset: true) do
only_when { hostname Socket.gethostname }
end
assert rcm.conds_met
end
def test_hostname_negative
rcm = configure(reset: true) do
only_when { hostname "#{Socket.gethostname}.invalid" }
end
refute rcm.conds_met
end
end
|