Skip to content

Instantly share code, notes, and snippets.

@elizabrock
Created May 5, 2014 18:29
Show Gist options
  • Save elizabrock/49c1e0d4c513c3e3b293 to your computer and use it in GitHub Desktop.
Save elizabrock/49c1e0d4c513c3e3b293 to your computer and use it in GitHub Desktop.
Message Expectations Example
class Cron
def self.run!
User.send_digests!
end
end
require 'spec_helper'
describe Cron do
context "delegating to models" do
it "should delegate to User" do
expect(User).to receive(:send_digests!)
Cron.run!
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment