It looks like info
is an instance of Employee
within your test. Therefore it is Employee
which receives the message contact
.
Try changing your test such that the should_receive
is placed on Employee
directly:
Employee.any_instance.should_receive(:contact).and_return('[contact]')