File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
spec/database_cleaner/redis Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 64
64
end
65
65
66
66
context "when passing url" do
67
- it "should store my describe db " do
68
- url = ' redis://localhost:6379/2'
69
- subject . db = 'redis://localhost:6379/2'
67
+ it "still works " do
68
+ url = @ redis. connection [ :id ]
69
+ subject . db = url
70
70
expect ( subject . db ) . to eq url
71
+ expect { subject . clean } . to change { @redis . keys . size } . from ( 2 ) . to ( 0 )
71
72
end
72
73
end
73
74
74
75
context "when passing connection" do
75
- it "should store my describe db " do
76
- connection = :: Redis . new : url => ' redis://localhost:6379/2'
76
+ it "still works " do
77
+ connection = Redis . new ( url : @ redis. connection [ :id ] )
77
78
subject . db = connection
78
79
expect ( subject . db ) . to eq connection
80
+ expect { subject . clean } . to change { @redis . keys . size } . from ( 2 ) . to ( 0 )
79
81
end
80
82
end
81
83
You can’t perform that action at this time.
0 commit comments