Sha256: 6de647dfce8ae4ac4035aa2f704ded89d9877555f9e37b618c411a2d28300ced

Contents?: true

Size: 523 Bytes

Versions: 2

Compression:

Stored size: 523 Bytes

Contents

require 'lightchef'

module Lightchef
  describe Resources::File do
    let(:recipe) { double(:recipe) }
    subject(:resource) { described_class.new(recipe, "name") }

    describe "#create_action" do
      it "copies a file" do
        recipe.stub(:path).and_return("/recipe_dir/recipe_file")
        subject.source "source.file"
        subject.path "/path/to/dst"
        expect(subject).to receive(:copy_file).with("/recipe_dir/source.file", "/path/to/dst")
        subject.create_action
      end
    end
  end
end


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lightchef-0.0.2 spec/lib/lightchef/resources/file_spec.rb
lightchef-0.0.1 spec/lib/lightchef/resources/file_spec.rb