From 1d2a37a3e1995e37cca783b521e85d64bd7fd8a3 Mon Sep 17 00:00:00 2001 From: Thom May Date: Tue, 3 May 2016 19:26:35 +0100 Subject: nuke some out of date tests --- .../chef_fs/file_system/repository/base_file_spec.rb | 18 ++++++++---------- 1 file 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 -- cgit v1.2.1