class Mocha::ParameterMatchers::YamlEquivalent
Parameter matcher which matches if actual parameter is YAML equivalent of specified object.
Public Class Methods
new(object)
click to toggle source
@private
# File lib/mocha/parameter_matchers/yaml_equivalent.rb, line 31 def initialize(object) @object = object end
Public Instance Methods
matches?(available_parameters)
click to toggle source
@private
# File lib/mocha/parameter_matchers/yaml_equivalent.rb, line 36 def matches?(available_parameters) parameter = available_parameters.shift # rubocop:disable Security/YAMLLoad @object == YAML.load(parameter) # rubocop:enable Security/YAMLLoad end
mocha_inspect()
click to toggle source
@private
# File lib/mocha/parameter_matchers/yaml_equivalent.rb, line 44 def mocha_inspect "yaml_equivalent(#{@object.mocha_inspect})" end