spec/features/validation_spec.rb in qonfig-0.26.0 vs spec/features/validation_spec.rb in qonfig-0.27.0
- old
+ new
@@ -234,10 +234,11 @@
expect(config.valid?).to eq(true)
begin
config.clear! # NOTE: set telegraf_url to nil (to incorrect value)
rescue Qonfig::ValidationError
+ # NOOP
end
expect(config.valid?).to eq(false)
end
@@ -298,10 +299,11 @@
config = child_config_klass.new
expect(config.valid?).to eq(true)
begin
config.settings.adapter = 123
rescue Qonfig::ValidationError
+ # NOOP
end
expect(config.valid?).to eq(false)
expect(config.settings.adapter).to eq(123)
# NOTE: own validations
@@ -316,9 +318,10 @@
config = child_config_klass.new
expect(config.valid?).to eq(true)
begin
config.settings.enabled = '123'
rescue Qonfig::ValidationError
+ # NOOP
end
expect(config.valid?).to eq(false)
expect(config.settings.enabled).to eq('123')
end