Handle scenario when no match is expected
Project: http://git-wip-us.apache.org/repos/asf/buildr/repo Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/84b3ecb5 Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/84b3ecb5 Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/84b3ecb5 Branch: refs/heads/master Commit: 84b3ecb51b3924647ba9752df3e5eb0f0caa04cb Parents: d64a248 Author: Peter Donald <[email protected]> Authored: Sun May 22 20:41:22 2016 +1000 Committer: Peter Donald <[email protected]> Committed: Sun May 22 20:41:22 2016 +1000 ---------------------------------------------------------------------- spec/xpath_matchers.rb | 1 + 1 file changed, 1 insertion(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/buildr/blob/84b3ecb5/spec/xpath_matchers.rb ---------------------------------------------------------------------- diff --git a/spec/xpath_matchers.rb b/spec/xpath_matchers.rb index c5c4ed7..e3aded7 100644 --- a/spec/xpath_matchers.rb +++ b/spec/xpath_matchers.rb @@ -74,6 +74,7 @@ module RSpec ok = true return false unless @val == @actual_val end + return true if !ok && @val.nil? return ok end
