Make error messages short to keep focusing on error causes.
Do not exit on RSpec::Expectations::ExpectationNotMetError that inherits Exception so that pbt continues shrinking phase.
RSpec.describe Pbt do
it "sorts an array" do
Pbt.assert do
Pbt.property(Pbt.array(Pbt.integer)) do |numbers|
result = sort(numbers)
result.each_cons(2) do |x, y|
expect(x).to be <= y
end
end
end
end
end
Change
RSpec::Expectations::ExpectationNotMetError
that inheritsException
so that pbt continues shrinking phase.