spec/unit/indirector/file_metadata/file_spec.rb in puppet-2.7.26 vs spec/unit/indirector/file_metadata/file_spec.rb in puppet-3.0.0.rc4

- old
+ new

@@ -1,6 +1,6 @@ -#!/usr/bin/env rspec +#! /usr/bin/env ruby -S rspec require 'spec_helper' require 'puppet/indirector/file_metadata/file' describe Puppet::Indirector::FileMetadata::File do @@ -19,11 +19,11 @@ @uri = Puppet::Util.path_to_uri(@path).to_s @data = mock 'metadata' @data.stubs(:collect) FileTest.expects(:exists?).with(@path).returns true - @request = Puppet::Indirector::Request.new(:file_metadata, :find, @uri) + @request = Puppet::Indirector::Request.new(:file_metadata, :find, @uri, nil) end it "should collect its attributes when a file is found" do @data.expects(:collect) @@ -36,10 +36,10 @@ before do @metadata = Puppet::Indirector::FileMetadata::File.new @path = File.expand_path('/my/local') @uri = Puppet::Util.path_to_uri(@path).to_s - @request = Puppet::Indirector::Request.new(:file_metadata, :find, @uri) + @request = Puppet::Indirector::Request.new(:file_metadata, :find, @uri, nil) end it "should collect the attributes of the instances returned" do FileTest.expects(:exists?).with(@path).returns true @metadata.expects(:path2instances).returns( [mock("one", :collect => nil), mock("two", :collect => nil)] )