class FIXSpec::Matchers::HaveFIXPath

Attributes

path[R]

Public Class Methods

new(path) click to toggle source
# File lib/fix_spec/matchers/have_fix_path.rb, line 6
def initialize path
  @path = path
  @json_matcher = JsonSpec::Matchers::HaveJsonPath.new path
end

Public Instance Methods

description() click to toggle source
# File lib/fix_spec/matchers/have_fix_path.rb, line 25
def description
  %(have Protobuf path "#{@path}")
end
failure_message_for_should() click to toggle source
# File lib/fix_spec/matchers/have_fix_path.rb, line 17
def failure_message_for_should
  %(Expected FIX path "#{@path}")
end
failure_message_for_should_not() click to toggle source
# File lib/fix_spec/matchers/have_fix_path.rb, line 21
def failure_message_for_should_not
  %(Expected no FIX path "#{@path}")
end
matches?(fix_message) click to toggle source
# File lib/fix_spec/matchers/have_fix_path.rb, line 11
def matches? fix_message
  fix_json =  FIXSpec::Helpers.message_to_unordered_json(fix_message)

  @json_matcher.matches? fix_json
end