diff options
author | Thom May <thom@chef.io> | 2016-05-03 19:26:35 +0100 |
---|---|---|
committer | Thom May <thom@chef.io> | 2016-05-05 14:35:48 +0100 |
commit | 1d2a37a3e1995e37cca783b521e85d64bd7fd8a3 (patch) | |
tree | bdc0c2ca961545c7889b64e74615875fea70a494 /spec/unit/chef_fs | |
parent | bdf929ef1218c21a63603243dc237d0e943810ca (diff) | |
download | chef-1d2a37a3e1995e37cca783b521e85d64bd7fd8a3.tar.gz |
nuke some out of date teststm/r_roles
Diffstat (limited to 'spec/unit/chef_fs')
-rw-r--r-- | spec/unit/chef_fs/file_system/repository/base_file_spec.rb | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/spec/unit/chef_fs/file_system/repository/base_file_spec.rb b/spec/unit/chef_fs/file_system/repository/base_file_spec.rb index bb0c267368..625ef32dca 100644 --- a/spec/unit/chef_fs/file_system/repository/base_file_spec.rb +++ b/spec/unit/chef_fs/file_system/repository/base_file_spec.rb @@ -47,7 +47,7 @@ describe Chef::ChefFS::FileSystem::Repository::BaseFile do end context "#is_json_file?" do - it "returns false when the file is not json" do + it "returns false when the file is not json", pending: "We assume that everything is ruby or JSON" do file = described_class.new("test_file.dpkg", parent) expect(file.is_json_file?).to be_falsey end @@ -63,11 +63,16 @@ describe Chef::ChefFS::FileSystem::Repository::BaseFile do expect(file.name_valid?).to be_falsey end - it "rejects non json files" do + it "rejects non json files", pending: "We assume that everything is ruby or JSON" do file = described_class.new("test_file.dpkg", parent) expect(file.name_valid?).to be_falsey end + it "allows ruby files" do + file = described_class.new("test_file.rb", parent) + expect(file.name_valid?).to be_truthy + end + it "allows correctly named files" do expect(file.name_valid?).to be_truthy end @@ -105,14 +110,7 @@ describe Chef::ChefFS::FileSystem::Repository::BaseFile do context "#write" do context "minimises a json object" do - it "not if pretty json is off" do - expect(file).to_not receive(:minimize) - file.write(content) - end - - it "not if it's not a json file" do - file = described_class.new("test_file.dpkg", parent) - file.write_pretty_json = true + it "unless pretty json is off" do expect(file).to_not receive(:minimize) file.write(content) end |