summaryrefslogtreecommitdiffstats
path: root/spec/integration/file_serving/terminus_helper_spec.rb
blob: 7500b1fc0f027d47967362622912b276c543b9f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env rspec
require 'spec_helper'

require 'puppet/file_serving/terminus_helper'

class TerminusHelperIntegrationTester
  include Puppet::FileServing::TerminusHelper
  def model
    Puppet::FileServing::Metadata
  end
end

describe Puppet::FileServing::TerminusHelper do
  it "should be able to recurse on a single file" do
    @path = Tempfile.new("fileset_integration")
    request = Puppet::Indirector::Request.new(:metadata, :find, @path.path, :recurse => true)

    tester = TerminusHelperIntegrationTester.new
    lambda { tester.path2instances(request, @path.path) }.should_not raise_error
  end
end