Sha256: 3ae378dd550e0ae405a51b97570baec18b3de02f0080adf746c0245e9ae0da23
Contents?: true
Size: 728 Bytes
Versions: 7
Compression:
Stored size: 728 Bytes
Contents
require "spec_helper" describe Berkshelf::Validator do describe "#validate_files" do let(:cookbook) { double("cookbook", cookbook_name: "cookbook", path: "path") } it "raises an error when the cookbook has spaces in the files" do allow(Dir).to receive(:glob).and_return(["/there are/spaces/in this/recipes/default.rb"]) expect do subject.validate_files(cookbook) end.to raise_error(Berkshelf::InvalidCookbookFiles) end it "does not raise an error when the cookbook is valid" do allow(Dir).to receive(:glob).and_return(["/there-are/no-spaces/in-this/recipes/default.rb"]) expect do subject.validate_files(cookbook) end.to_not raise_error end end end
Version data entries
7 entries across 7 versions & 1 rubygems