Last active
December 14, 2015 07:29
-
-
Save vanstee/5050689 to your computer and use it in GitHub Desktop.
This file contains 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
class Item | |
def does_something | |
PublishingHouse.new(@document).publish | |
end | |
end | |
it 'publishes the document' do | |
publishing_house = stub('PublishingHouse') | |
publishing_house.should_receive(:publish).once | |
PublishingHouse.should_receive(:new).with(document) { publishing_house } | |
Item.new(document).does_something | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment