2024-05-12 05:59:38 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2024-03-08 00:27:20 +01:00
|
|
|
require_relative "../setup"
|
|
|
|
module BSD::Control
|
2024-05-13 03:32:55 +02:00
|
|
|
class FeatureTest < BSD::Control::Test
|
2024-03-20 20:25:20 +01:00
|
|
|
def test_pageexec_feature
|
2024-10-13 07:05:01 +02:00
|
|
|
assert_instance_of BSD::Control::Feature, feature(:pageexec)
|
2024-03-08 00:27:20 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
def test_nonexistent_feature
|
2024-10-13 07:05:01 +02:00
|
|
|
assert_raises(BSD::Control::Error) { feature(:non_existent_feature) }
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def feature(name)
|
|
|
|
BSD::Control.feature(name)
|
2024-03-08 00:27:20 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|