Skip to content

Commit

Permalink
Merge pull request rspec#2759 from rspec/relax-aggregate-failure-mess…
Browse files Browse the repository at this point in the history
…ages

Relax aggregate failures expectations on messages
  • Loading branch information
JonRowe committed Sep 3, 2020
2 parents 8f29def + db9fa63 commit 8b1da2b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions spec/rspec/core/aggregate_failures_spec.rb
Expand Up @@ -15,7 +15,7 @@

expect(ex.execution_result.__send__(exception_attribute)).to have_attributes(
:all_exceptions => [
an_object_having_attributes(:message => 'expected `1.even?` to return true, got false'),
an_object_having_attributes(:message => /expected.*even\?/),
an_object_having_attributes(:message => 'after'),
an_object_having_attributes(:message => 'around')
]
Expand Down Expand Up @@ -49,8 +49,8 @@
)

expect(exception.all_exceptions.first.all_exceptions).to match [
an_object_having_attributes(:message => 'expected `1.even?` to return true, got false'),
an_object_having_attributes(:message => 'expected `2.odd?` to return true, got false')
an_object_having_attributes(:message => /expected.*even\?/),
an_object_having_attributes(:message => /expected.*odd\?/)
]
end
end
Expand All @@ -71,8 +71,8 @@
expect(ex.execution_result.status).to eq(:pending) if example_meta.key?(:pending)
expect(ex.execution_result.__send__(exception_attribute)).to have_attributes(
:all_exceptions => [
an_object_having_attributes(:message => 'expected `1.even?` to return true, got false'),
an_object_having_attributes(:message => 'expected `2.odd?` to return true, got false')
an_object_having_attributes(:message => /expected.*even\?/),
an_object_having_attributes(:message => /expected.*odd\?/)
]
)
end
Expand All @@ -90,7 +90,7 @@

expect(ex.execution_result.__send__(exception_attribute)).to have_attributes(
:all_exceptions => [
an_object_having_attributes(:message => 'expected `1.even?` to return true, got false'),
an_object_having_attributes(:message => /expected.*even\?/),
an_object_having_attributes(:class => NameError, :message => /boom/)
]
)
Expand All @@ -111,8 +111,8 @@

expect(ex.execution_result.__send__(exception_attribute)).to have_attributes(
:all_exceptions => [
an_object_having_attributes(:message => 'expected `1.even?` to return true, got false'),
an_object_having_attributes(:message => 'expected `2.odd?` to return true, got false'),
an_object_having_attributes(:message => /expected.*even\?/),
an_object_having_attributes(:message => /expected.*odd\?/),
an_object_having_attributes(:class => NameError, :message => /boom/)
]
)
Expand Down

0 comments on commit 8b1da2b

Please sign in to comment.