expect(a).to(receive(:x).once)
expect(a).to(receive(:x).twice)
expect(a).to(receive(:x).and_return(1).once)
expect(a).to(receive(:x).and_return(1).twice)
expect(a).to(receive(:x).with(:y).and_return(1).once)
expect(a).to(receive(:x).with(:y).and_return(1).twice)
expect(a).to(receive(:x).once)
expect(a).to(receive(:x).twice)
expect(a).to(receive(:x).and_return(1).once)
expect(a).to(receive(:x).and_return(1).twice)
expect(a).to(receive(:x).with(:y).and_return(1).once)
expect(a).to(receive(:x).with(:y).and_return(1).twice)
expect_any_instance_of(A).to(receive(:x).once)
expect_any_instance_of(A).to(receive(:x).twice)
expect_any_instance_of(A).to(receive(:x).and_return(1).once)
expect_any_instance_of(A).to(receive(:x).and_return(1).twice)
expect_any_instance_of(A).to(receive(:x).and_return(1).once)
expect_any_instance_of(A).to(receive(:x).and_return(1).twice)
expect_any_instance_of(A).to(receive(:x).with(:y).and_return(1).once)
expect_any_instance_of(A).to(receive(:x).with(:y).and_return(1).twice)
expect_any_instance_of(A).to(receive(:x).with(:y).and_return(1).once)
expect_any_instance_of(A).to(receive(:x).with(:y).and_return(1).twice)
