Sha256: d027a4b92a2bff78f8199e81a0ca689b4e829f0894f163ce1f2eaf1f36561d04
Contents?: true
Size: 551 Bytes
Versions: 5
Compression:
Stored size: 551 Bytes
Contents
module JsonSpec module Matchers class HaveJsonPath include JsonSpec::Helpers def initialize(path) @path = path end def matches?(json) parse_json(json, @path) true rescue JsonSpec::MissingPath false end def failure_message_for_should %(Expected JSON path "#{@path}") end def failure_message_for_should_not %(Expected no JSON path "#{@path}") end def description %(have JSON path "#{@path}") end end end end
Version data entries
5 entries across 5 versions & 1 rubygems