Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add #subscribed? to helpers called w/o namespace #101

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/redis/namespace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ class Namespace
"echo" => [],
"ping" => [],
"disconnect!" => [],
"subscribed?" => [],
}
ADMINISTRATIVE_COMMANDS = {
"bgrewriteaof" => [],
Expand Down
6 changes: 6 additions & 0 deletions spec/redis_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,12 @@
expect(@namespaced.disconnect!).to be nil
end

it 'should not add namespace to subscribed?' do
expect(@redis).to receive(:subscribed?).with().and_call_original

expect(@namespaced.subscribed?).to be false
end

it "can change its namespace" do
@namespaced['foo'].should eq(nil)
@namespaced['foo'] = 'chris'
Expand Down