Changes just set the TCP_NODELAY flag on TCP sockets when running on a system that has that flag.
Fixes issue #41 for me.
Set TCP_NODELAY option on the TCPSocket
Guard TCP_NODELAY with kind_of? and defined? tests
I don't have a test system that doesn't have TCP_NODELAY defined, but
presumably these conditions are enough to confine its use to systems on
which it makes sense.
Thanks for the patch. I'd like to get this pulled in, but we need to get it tested first. Even a straight stub/spy/mock would suffice. Otherwise, I'm pretty likely to break this while refactoring.
Is there any news?
Update to match standard socket style
Test for TCP_NODELAY - doesn't work w/ rspec 2.6.0
First commit is just a minor style update. Second is an in-progress test for this. It fails in RSpec 2.6.0 (some issue with rspec-mocks) -- passes if I remove the '~> 2.6.0' condition in the gemspec. Someone more familiar w/ RSpec mocks could probably fix my test, but I'm also not positive I'm testing what needs to be tested (@jferris ?).
This branch works great for me, 197 scenarios with 2556 steps (not all tests running in capybara-webkit) ran in 1/3 the time. All my tests still pass (I was using commit e677cb9 previously)
Thanks. I had to make some modifications to get the tests passing for me, but this is merged now.