Created
December 1, 2011 16:00
-
-
Save ariejan/1417792 to your computer and use it in GitHub Desktop.
EM::Connection specs?
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
module MyApp | |
class Con < EM::Connection | |
def post_init | |
@queue = EM::Queue.new | |
end | |
def receive_data(data) | |
@queue.push(data) | |
end | |
end | |
end |
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
require 'spec_helper' | |
describe MyApp::Con do | |
it "should create a queue post_init" do | |
# ?? | |
end | |
it "should post received data on the queue" do | |
# ?? | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment