aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_helper.rb
Commit message (Collapse)AuthorAgeFilesLines
* Send subscription confirmation from server to the client to avoid race ↵Pratik Naik2015-10-161-0/+1
| | | | | | | | | | conditions. Without this, it's very easy to send messages over a subscription even before the redis pubsub has been fully initialized. Now we delay calling the subscription#connected method on the client side until we receive a subscription confirmation message from the server.
* Merge pull request #97 from lsylvester/speed-up-testsJeremy Daer2015-10-161-1/+2
|\ | | | | Speed up tests be calling EM.run_deferred_callbacks instead of setting a timer
| * Speed up tests be calling EM.run_deferred_callbacks instead of setting a timerLachlan Sylvester2015-10-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The run_in_eventmachine test helper method is setting a 0.1 second timer to stop the event machine loop. This causes each test that requires an event machine loop to wait for 0.1 second regardless of how long the test takes to process. This changes that to call EM.run_deferred_callbacks, which immediatly process pending actions in the event loop and then is able to exit the event loop without doing any waiting. Before this change, running tests produced Finished in 2.957857s, 15.8899 runs/s, 27.7228 assertions/s. After, the tests get Finished in 0.065942s, 712.7514 runs/s, 1243.5237 assertions/s.
* | Devolve blanket #require to reveal intent and responsibilityJeremy Daer2015-10-161-0/+2
| | | | | | | | | | | | | | | | * Move specific requires close to where they're needed. * Use the private active_support/rails dep to wrap up common needs like eager autoload and module delegation. * Use a single Rails engine rather than an engine and a railtie. * Prefer `AS::JSON.encode` to `Object#to_json`.
* | Shush some low-hanging Ruby warningsJeremy Daer2015-10-161-2/+6
|/
* Websockets -> WebSocket spelling [ci skip]Jeremy Daer2015-10-151-1/+1
|
* Run connection tests in EM loopPratik Naik2015-10-151-0/+18
|
* Update gems and requiresThomas Walpole2015-07-221-0/+2
|
* Worker testsPratik Naik2015-07-141-0/+2
|
* Remove busted testsPratik Naik2015-07-131-28/+0
|
* Always load all the stub filesPratik Naik2015-07-131-0/+3
|
* Add some more testsPratik Naik2015-07-121-2/+1
|
* Load mocha for testsPratik Naik2015-07-121-0/+2
|
* Dont create the test log filePratik Naik2015-02-131-4/+0
|
* No cramp and use celluloid workers to run callbacksPratik Naik2015-02-051-2/+1
|
* Add some tests. Work in progress. Testing websockets is hard.Pratik Naik2015-01-151-0/+46