Skip to content

Allow dynamic return values #10

@joshuaspence

Description

@joshuaspence

I want to create a mock Puppet function that always returns its third argument. I was expecting something like this to work, but it seems that it does not:

MockFunction.new(:my_function) do |func|
  func.stubbed.returns { |x, y, z| z }
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions