Sha256: f88d5245d1adb7c8a1622832c440759f6c41dd88bae0bda3e0a875ebf87813e8
Contents?: true
Size: 750 Bytes
Versions: 23
Compression:
Stored size: 750 Bytes
Contents
#!/usr/bin/env ruby #--- # Copyright 2003-2013 by Jim Weirich (jim.weirich@gmail.com). # All rights reserved. # # Permission is granted for use, copying, modification, distribution, # and distribution of modified versions of this work as long as the # above copyright notice is included. #+++ class FlexMock CallRecord = Struct.new(:method_name, :args, :block_given, :expectation) do def matches?(sym, actual_args, options) method_name == sym && ArgumentMatching.all_match?(actual_args, args) && matches_block?(options[:with_block]) end private def matches_block?(block_option) block_option.nil? || (block_option && block_given) || (!block_option && !block_given) end end end
Version data entries
23 entries across 23 versions & 1 rubygems