spec/transactions_spec.rb in fakeredis-0.7.0 vs spec/transactions_spec.rb in fakeredis-0.8.0

- old
+ new

@@ -86,7 +86,20 @@ responses = @client.multi { |multi| multi.hset('hash', 'key', 'value') } expect(responses[0]).to eq(true) end end + + context 'executing set commands in a block' do + it "returns commands' responses for nested commands" do + @client.sadd('set', 'member1') + + responses = @client.multi do |multi| + multi.sadd('set', 'member1') + multi.sadd('set', 'member2') + end + + expect(responses).to eq([false, true]) + end + end end end