class Rspec::Bash::Util::CallLogArgumentListMatcher
Public Class Methods
new(expected_args = [any_args])
click to toggle source
# File lib/rspec/bash/util/call_log_argument_list_matcher.rb, line 12 def initialize(expected_args = [any_args]) expected_args = expected_args.empty? ? [any_args] : expected_args parent_initialize(*expected_args) end
Also aliased as: parent_initialize
Public Instance Methods
args_match?(actual_call_log_list)
click to toggle source
# File lib/rspec/bash/util/call_log_argument_list_matcher.rb, line 17 def args_match?(actual_call_log_list) get_call_count(actual_call_log_list) > 0 end
Also aliased as: parent_args_match?
get_call_count(actual_call_log_list)
click to toggle source
# File lib/rspec/bash/util/call_log_argument_list_matcher.rb, line 21 def get_call_count(actual_call_log_list) get_call_log_matches(actual_call_log_list).size end
get_call_log_matches(actual_call_log_list)
click to toggle source
# File lib/rspec/bash/util/call_log_argument_list_matcher.rb, line 25 def get_call_log_matches(actual_call_log_list) actual_call_log_list.select do |actual_call_list| parent_args_match?(*actual_call_list[:args]) end end