Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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