class ProtobufSpec::Matchers::HaveProtobufPath
Attributes
path[R]
Public Class Methods
new(path)
click to toggle source
# File lib/protobuf_spec/matchers/have_protobuf_path.rb, line 5 def initialize path @path = path @json_matcher = JsonSpec::Matchers::HaveJsonPath.new path end
Public Instance Methods
description()
click to toggle source
# File lib/protobuf_spec/matchers/have_protobuf_path.rb, line 22 def description %(have Protobuf path "#{@path}") end
failure_message_for_should()
click to toggle source
# File lib/protobuf_spec/matchers/have_protobuf_path.rb, line 14 def failure_message_for_should %(Expected Protobuf path "#{@path}") end
failure_message_for_should_not()
click to toggle source
# File lib/protobuf_spec/matchers/have_protobuf_path.rb, line 18 def failure_message_for_should_not %(Expected no Protobuf path "#{@path}") end
matches?(proto)
click to toggle source
# File lib/protobuf_spec/matchers/have_protobuf_path.rb, line 10 def matches? proto @json_matcher.matches? proto.to_json end