Skip to content

Remove RSpec warnings from `spec/models/ci/build_spec.rb`

Robert Speicher requested to merge rs-ci-build-spec-warnings into master

Resolves these warnings:

......................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 /Users/rspeicher/Code/gitlab/gdk-ce/gitlab-ce/spec/models/ci/build_spec.rb:1961:in `block (5 levels) in <top (required)>'.
........................................................................................................................................................................................................user is a NilClass - rspec-set works with ActiveRecord models only
.user is a NilClass - rspec-set works with ActiveRecord models only
.user is a NilClass - rspec-set works with ActiveRecord models only
.user is a NilClass - rspec-set works with ActiveRecord models only
.user is a NilClass - rspec-set works with ActiveRecord models only
.user is a NilClass - rspec-set works with ActiveRecord models only
............user is a NilClass - rspec-set works with ActiveRecord models only
.user is a NilClass - rspec-set works with ActiveRecord models only
.user is a NilClass - rspec-set works with ActiveRecord models only
.user is a NilClass - rspec-set works with ActiveRecord models only
.user is a NilClass - rspec-set works with ActiveRecord models only
.user is a NilClass - rspec-set works with ActiveRecord models only
....

Finished in 1 minute 21.17 seconds (files took 1.28 seconds to load)
248 examples, 0 failures

Randomized with seed 1189

See individual commits for details.

Edited by Robert Speicher

Merge request reports