Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move engine specs into separate files.
- Loading branch information
Showing
4 changed files
with
31 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
require "spec_helper" | ||
|
||
describe Faye::Engine::Memory do | ||
let(:engine_opts) { {:type => Faye::Engine::Memory} } | ||
it_should_behave_like "faye engine" | ||
end | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
require "spec_helper" | ||
|
||
describe Faye::Engine::Redis do | ||
let(:engine_opts) { {:type => Faye::Engine::Redis, :password => "foobared", :namespace => Time.now.to_i.to_s} } | ||
|
||
after do | ||
engine.disconnect | ||
redis = EM::Hiredis::Client.connect('localhost', 6379) | ||
redis.auth(engine_opts[:password]) | ||
redis.flushall | ||
end | ||
|
||
it_should_behave_like "faye engine" | ||
it_should_behave_like "distributed engine" | ||
|
||
describe "using a Unix socket" do | ||
before { engine_opts[:socket] = "/tmp/redis.sock" } | ||
it_should_behave_like "faye engine" | ||
end | ||
end | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,6 @@ def parse(bytes) | |
@parser.parse(bytes.map { |b| b.chr } * '') | ||
end | ||
end | ||
|
||
require "ruby/engine" | ||
|