Skip to content

Instantly share code, notes, and snippets.

@amclain
Created March 5, 2014 07:32
Show Gist options
  • Save amclain/9362756 to your computer and use it in GitHub Desktop.
Save amclain/9362756 to your computer and use it in GitHub Desktop.
it "send_array attempts an array conversion if the object is not an array" do
data = Object.new.tap {|obj|
obj.instance_eval { def to_a; [1,2,3,4]; end }
}
push_sock.send_array data
pull_sock.recv_array.should eq data.to_a.map {|i| i.to_s }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment