Skip to content

Fix predicates to return actual true/false values

gitlab-qa-bot requested to merge github/fork/marcandre/strict_predicates into main

Created by: marcandre

This PR fixes pending?, skipped? and pending_fixed? so they return true / false values.

It also turns on expectations.strict_predicate_matchers config; with this new config, some specs were failing because these predicates were not returning the right values.

rspec ./spec/rspec/core/metadata_spec.rb:104 # RSpec::Core::Metadata for an example creates an empty execution result
rspec ./spec/rspec/core/example_group_spec.rb:1126 # RSpec::Core::ExampleGroup skip with message in metadata generates a skipped example
rspec ./spec/rspec/core/example_group_spec.rb[1:36:1] # RSpec::Core::ExampleGroup.xit generates a skipped example
rspec ./spec/rspec/core/example_group_spec.rb[1:38:1] # RSpec::Core::ExampleGroup.xexample generates a skipped example
rspec ./spec/rspec/core/example_group_spec.rb[1:37:1] # RSpec::Core::ExampleGroup.xspecify generates a skipped example

Precursor to rspec/rspec-expectations#1196

Merge request reports