Skip to content

Commit

Permalink
[ci] Update expectation of validation helper spec
Browse files Browse the repository at this point in the history
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 <top (required)>'."
  • Loading branch information
bgeuken committed Apr 19, 2017
1 parent 6c80032 commit 377a069
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/spec/helpers/validation_helper_spec.rb
Expand Up @@ -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

0 comments on commit 377a069

Please sign in to comment.