Skip to content

Instantly share code, notes, and snippets.

@cupakromer
Created September 30, 2013 16:09
Show Gist options
  • Save cupakromer/6766137 to your computer and use it in GitHub Desktop.
Save cupakromer/6766137 to your computer and use it in GitHub Desktop.
Example of using StringIO
describe 'Your stuff here' do
context "when doing something fun" do
it "let's the world know" do
io = StringIO.new
logger = Logger.new(io)
activity = Activity.new(logger: logger)
expect{ activity.play }.to change{ io.string }.to include "Having so much fun!"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment