spec/redstream_spec.rb in redstream-0.4.0 vs spec/redstream_spec.rb in redstream-0.4.1

- old
+ new

@@ -32,32 +32,32 @@ describe ".stream_size" do it "returns the stream's size" do expect(Redstream.stream_size("products")).to eq(0) - redis.xadd("redstream:stream:products", key: "value") + redis.xadd("redstream:stream:products", { key: "value" }) expect(Redstream.stream_size("products")).to eq(1) end end describe ".max_stream_id" do it "returns the stream's max id" do expect(Redstream.max_stream_id("products")).to be_nil - _id1 = redis.xadd("redstream:stream:products", key: "value") - id2 = redis.xadd("redstream:stream:products", key: "value") + _id1 = redis.xadd("redstream:stream:products", { key: "value" }) + id2 = redis.xadd("redstream:stream:products", { key: "value" }) expect(Redstream.max_stream_id("products")).to eq(id2) end end describe ".max_consumer_id" do it "returns the consumer's max id" do expect(Redstream.max_consumer_id(stream_name: "products", consumer_name: "consumer")).to be_nil - _id1 = redis.xadd("redstream:stream:products", key: "value") - id2 = redis.xadd("redstream:stream:products", key: "value") + _id1 = redis.xadd("redstream:stream:products", { key: "value" }) + id2 = redis.xadd("redstream:stream:products", { key: "value" }) Redstream::Consumer.new(name: "consumer", stream_name: "products").run_once do |messages| # nothing end