Last active
December 10, 2015 00:39
-
-
Save wojtekmach/4353110 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| describe 'Notifier' do | |
| before do | |
| SMS.stub(:deliver) | |
| Expense.stub(:create) | |
| @user = double 'user', mobile_number: '1234' | |
| @message = 'hello' | |
| Notifier.notify(@user, @message) | |
| end | |
| it 'delivers SMS' do | |
| SMS.should have_received(:deliver).with(@user.mobile_number, @message) | |
| end | |
| it 'records SMS expense' do | |
| Expense.should have_received(:create).with(:sms) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment