at_least_once is the way you do it in Mocha.
I believe with rspec you just add a .once at the end
class Account
attr_accessor :logger
def open
logger.account_opened
end
end
describe Account do
context "when opened" do
it "logger#account_opened was called once" do
logger = double("logger")
account = Account.new
account.logger = logger
logger.should_receive(:account_opened).once
account.open
end
end
end
that example is from here