From 377a069a977735c3b466a044c90a638dfc9e3b43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Geuken?= Date: Wed, 19 Apr 2017 13:47:51 +0200 Subject: [PATCH] [ci] Update expectation of validation helper spec To spare myself from writing explanations;-) : "WARNING: Using `expect { }.not_to raise_error(SpecificErrorClass)` risks false positives, since literally any other error would cause the expectation to pass, including those raised by Ruby (e.g. NoMethodError, NameError and ArgumentError), meaning the code you are intending to test may not even get reached. Instead consider using `expect {}.not_to raise_error` or `expect { }.to raise_error(DifferentSpecificErrorClass)`. This message can be suppressed by setting: `RSpec::Expectations.configuration.on_potential_false_positives = :nothing`. Called from /vagrant/src/api/spec/helpers/validation_helper_spec.rb:17:in `block (3 levels) in '." --- src/api/spec/helpers/validation_helper_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/spec/helpers/validation_helper_spec.rb b/src/api/spec/helpers/validation_helper_spec.rb index 4beea87fb29..ab73c9da4a4 100644 --- a/src/api/spec/helpers/validation_helper_spec.rb +++ b/src/api/spec/helpers/validation_helper_spec.rb @@ -14,7 +14,7 @@ end it 'does not raise an exception on valid project names' do - expect { valid_project_name!("home:mschnitzer") }.to_not raise_error(ValidationHelper::InvalidProjectNameError) + expect { valid_project_name!("home:mschnitzer") }.to_not raise_error end end end