Method: BoltSpec::Plans::DownloadStub#matches

Defined in:
lib/bolt_spec/plans/action_stubs/download_stub.rb

#matches(targets, _source, destination, options) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/bolt_spec/plans/action_stubs/download_stub.rb', line 6

def matches(targets, _source, destination, options)
  if @invocation[:targets] && Set.new(@invocation[:targets]) != Set.new(targets.map(&:name))
    return false
  end

  if @invocation[:destination] && destination != @invocation[:destination]
    return false
  end

  if @invocation[:options] && options != @invocation[:options]
    return false
  end

  true
end