class RSpec::Matchers::BuiltIn::Compound::NestedEvaluator

Normally, we evaluate the matching sequentially. For an expression like ‘expect(x).to foo.and bar`, this becomes:

expect(x).to foo
expect(x).to bar

For block expectations, we need to nest them instead, so that ‘expect { x }.to foo.and bar` becomes:

expect {
  expect { x }.to foo
}.to bar

This is necessary so that the ‘expect` block is only executed once.