Sha256: 53dbbba1c0d725eace8fc308d1d6438f4b2e728eeea5405607e30511d11852ef

Contents?: true

Size: 914 Bytes

Versions: 20

Compression:

Stored size: 914 Bytes

Contents

require "#{File.dirname(__FILE__)}/../../../../test_helper"

include_fixture_resources
include_chef_only_resources

class RemoteFileResourceTest < Test::Unit::TestCase
  context "Base" do
    setup do
      PoolParty::Resource.define_resource_methods
      @res = PoolParty::Resources::RemoteFile.new "/tmp/testfile" do
        source "http://www.example.com/tempfiles/testfile"
        mode "0644"
        checksum "08da002l" # A SHA256 (or portion thereof) of the file.
      end
      @base = DependencyResolvers::Chef
      @base.compile_directory = test_dir
    end
    
    should "have the method denoted by has_method_name for remote_file" do
      str =<<-EOE
remote_file "/tmp/testfile" do
  source "http://www.example.com/tempfiles/testfile"
  action :create
  backup 5
  mode 0644
  owner "root"
  checksum "08da002l"
end
EOE

      assert_equal str.chomp, @base.compile(@res)
    end
    
  end
  
end

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
auser-poolparty-1.3.0 test/lib/dependency_resolvers/chef/resources/remote_file_test.rb
auser-poolparty-1.3.1 test/lib/dependency_resolvers/chef/resources/remote_file_test.rb
auser-poolparty-1.3.10 test/lib/dependency_resolvers/chef/resources/remote_file_test.rb
auser-poolparty-1.3.11 test/lib/dependency_resolvers/chef/resources/remote_file_test.rb
auser-poolparty-1.3.12 test/lib/dependency_resolvers/chef/resources/remote_file_test.rb
auser-poolparty-1.3.13 test/lib/dependency_resolvers/chef/resources/remote_file_test.rb
auser-poolparty-1.3.2 test/lib/dependency_resolvers/chef/resources/remote_file_test.rb
auser-poolparty-1.3.3 test/lib/dependency_resolvers/chef/resources/remote_file_test.rb
auser-poolparty-1.3.4 test/lib/dependency_resolvers/chef/resources/remote_file_test.rb
auser-poolparty-1.3.5 test/lib/dependency_resolvers/chef/resources/remote_file_test.rb
auser-poolparty-1.3.6 test/lib/dependency_resolvers/chef/resources/remote_file_test.rb
auser-poolparty-1.3.7 test/lib/dependency_resolvers/chef/resources/remote_file_test.rb
auser-poolparty-1.3.8 test/lib/dependency_resolvers/chef/resources/remote_file_test.rb
fairchild-poolparty-1.3.5 test/lib/dependency_resolvers/chef/resources/remote_file_test.rb
poolparty-1.3.8 test/lib/dependency_resolvers/chef/resources/remote_file_test.rb
poolparty-1.3.7 test/lib/dependency_resolvers/chef/resources/remote_file_test.rb
poolparty-1.3.6 test/lib/dependency_resolvers/chef/resources/remote_file_test.rb
poolparty-1.3.4 test/lib/dependency_resolvers/chef/resources/remote_file_test.rb
poolparty-1.3.3 test/lib/dependency_resolvers/chef/resources/remote_file_test.rb
poolparty-1.3.1 test/lib/dependency_resolvers/chef/resources/remote_file_test.rb