mirror of
https://github.com/inspec/inspec
synced 2024-11-10 15:14:23 +00:00
condense true/false enabled tests
Because of the way the test system loads I cannot guarantee that `Inspec::Config.cached` won't be nil. I have to always pass in a mock config object with our setting. Signed-off-by: Miah Johnson <miah@chia-pet.org>
This commit is contained in:
parent
ea0643cc14
commit
0b9833dd96
1 changed files with 3 additions and 6 deletions
|
@ -41,13 +41,10 @@ class TestTelemetryCollector < Minitest::Test
|
|||
assert_equal 0, @collector.list_data_series.count
|
||||
end
|
||||
|
||||
def test_telemetry_disabled
|
||||
@collector.load_config(Inspec::Config.mock(telemetry: false))
|
||||
refute @collector.telemetry_enabled?
|
||||
end
|
||||
|
||||
def test_telemetry_enabled
|
||||
@collector.load_config(Inspec::Config.mock(telemetry: true))
|
||||
@collector.load_config(Inspec::Config.mock("enable_telemetry"=>false))
|
||||
refute @collector.telemetry_enabled?
|
||||
@collector.load_config(Inspec::Config.mock("enable_telemetry"=>true))
|
||||
assert @collector.telemetry_enabled?
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue