spec/riak/client_spec.rb in riak-client-2.2.2 vs spec/riak/client_spec.rb in riak-client-2.3.0

- old
+ new

@@ -240,7 +240,18 @@ end expect(error).not_to be_nil expect(error).to be_instance_of(RuntimeError) end + + it "logs the error" do + expect(Riak.logger).to receive(:warn).with(/Riak::ProtobuffsFailedHeader/).at_least(:once) + + begin + @client.backend do |b| + raise Riak::ProtobuffsFailedHeader + end + rescue RuntimeError + end + end end end