diff options
Diffstat (limited to 'spec/unit/application/resource_spec.rb')
-rwxr-xr-x | spec/unit/application/resource_spec.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/unit/application/resource_spec.rb b/spec/unit/application/resource_spec.rb index 01cd17e00..b6ed8598d 100755 --- a/spec/unit/application/resource_spec.rb +++ b/spec/unit/application/resource_spec.rb @@ -235,12 +235,13 @@ describe Puppet::Application::Resource do end it "should output a file resource when given a file path" do - res = Puppet::Type.type(:file).new(:path => "/etc").to_resource + path = File.expand_path('/etc') + res = Puppet::Type.type(:file).new(:path => path).to_resource Puppet::Resource.indirection.expects(:find).returns(res) - @resource.command_line.stubs(:args).returns(['file', '/etc']) + @resource.command_line.stubs(:args).returns(['file', path]) @resource.expects(:puts).with do |args| - args.should =~ /file \{ '\/etc'/m + args.should =~ /file \{ '#{Regexp.escape(path)}'/m end @resource.main |