RSpec::Mocks.allow_message
RSpec::Mocks.expect_message()
Merge branch 'syntax_agnostic_message_matchers' of https://github.com/pda/rspec-mocks into syntax_agnostic_message_matchers
Use syntax agnostic matchers for should syntax.

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Add a negative expectation matcher to the syntax agnostic matchers.

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Pass callers consistently in syntax-agnostic message matchers.

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Use the first caller that isn't in rspec-mocks for expectations on nil.

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Fix up the specs around message allowances with block implementations.

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Fix spec so that it actually tests what it is meant to.

The original expectation would pass even if this method
did not support a block implementation.
Reconcile differences between two different ways to set a negative expectation.

`expect().not_to receive`/`should_not_receive` (form A) vs
`expect().to receive().never`/`should_receive().never` (form B)
had slightly different behavior even though they are intended to
work the same.

Specifically:

- Form A would cause an error to be raised when `and_return` was chained off
  of it, since that is nonsensical. Form B did not raise this error.
- Form A supported a negation for particular arguments specified with `with`,
  but Form B did not - it was always a universal negation for all possible
  arguments.

I've reconciling this difference by making Form A simply delegate to Form B
under the covers. This allowed use to get rid of a bunch of code.
Prevent confusing double negative expressions.

Examples:

expect(obj).not_to receive(:msg).never
obj.should_not_receive(:msg).never
expect_any_instance_of(kls).not_to receive(:msg).never
kls.any_instance.should_not_receive(:msg).never

These expressions make no sense and should not be supported.
Flesh out the yard docs for the syntax agnostic message matchers.

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Add a changelog entry for #311 and #334.

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Fix the yard docs for stuff I typod/didn't commit.

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
make @myronmarstons typo corrections
Show the necessary RSpec::Mocks prefix in yard docs.

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Merge pull request #334 from rspec/syntax_agnostic_message_matchers

@samphippen's wrap up of #311: syntax agnostic message matchers