class ProtobufSpec::Matchers::BeProtobufEql
Public Class Methods
new(expected_json = nil)
click to toggle source
# File lib/protobuf_spec/matchers/be_protobuf_eql.rb, line 12 def initialize(expected_json = nil) @json_matcher= JsonSpec::Matchers::BeJsonEql.new expected_json end
Public Instance Methods
actual()
click to toggle source
# File lib/protobuf_spec/matchers/be_protobuf_eql.rb, line 20 def actual @json_matcher.actual end
at_path(path)
click to toggle source
# File lib/protobuf_spec/matchers/be_protobuf_eql.rb, line 24 def at_path(path) @path=path @json_matcher.at_path path self end
description()
click to toggle source
# File lib/protobuf_spec/matchers/be_protobuf_eql.rb, line 42 def description message_with_path("equal Protobuf") end
diffable?()
click to toggle source
# File lib/protobuf_spec/matchers/be_protobuf_eql.rb, line 8 def diffable? true end
expected()
click to toggle source
# File lib/protobuf_spec/matchers/be_protobuf_eql.rb, line 16 def expected @json_matcher.expected end
failure_message_for_should()
click to toggle source
# File lib/protobuf_spec/matchers/be_protobuf_eql.rb, line 34 def failure_message_for_should message_with_path("Expected equivalent Protobuf") end
matches?(protobuf)
click to toggle source
# File lib/protobuf_spec/matchers/be_protobuf_eql.rb, line 30 def matches?(protobuf) @json_matcher.matches? protobuf.to_json end
negative_failure_message()
click to toggle source
# File lib/protobuf_spec/matchers/be_protobuf_eql.rb, line 38 def negative_failure_message message_with_path("Expected inequivalent Protobuf") end